@Entity public class IndexFieldImpl extends Object implements IndexField, Serializable, IndexFieldAdminPresentation, AdminMainEntity
IndexFieldAdminPresentation.FieldOrder, IndexFieldAdminPresentation.GroupName, IndexFieldAdminPresentation.GroupOrder, IndexFieldAdminPresentation.TabName, IndexFieldAdminPresentation.TabOrder
Modifier and Type | Field and Description |
---|---|
protected Field |
field |
protected List<IndexFieldType> |
fieldTypes |
protected Long |
id |
protected Boolean |
searchable |
MAIN_ENTITY_NAME_PROPERTY
Constructor and Description |
---|
IndexFieldImpl() |
Modifier and Type | Method and Description |
---|---|
<G extends IndexField> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
boolean |
equals(Object obj) |
Field |
getField()
Gets the field for this search field
|
List<IndexFieldType> |
getFieldTypes()
Gets the searchable field types for this search field
|
Long |
getId()
Gets the id for this search field
|
String |
getMainEntityName() |
Boolean |
getSearchable()
Whether or not the user should see results for this field when typing in search terms in the omnibox, or if
this is just a field stored in the index (like margin or sorts)
|
int |
hashCode() |
void |
setField(Field field)
Sets the field for this search field
|
void |
setFieldTypes(List<IndexFieldType> fieldTypes)
Sets the searchable field types for this search field
|
void |
setId(Long id)
Sets the id for this search field
|
void |
setSearchable(Boolean searchable) |
protected Long id
protected Boolean searchable
protected Field field
protected List<IndexFieldType> fieldTypes
public Long getId()
IndexField
getId
in interface IndexField
public void setId(Long id)
IndexField
setId
in interface IndexField
public Boolean getSearchable()
IndexField
getSearchable
in interface IndexField
public void setSearchable(Boolean searchable)
setSearchable
in interface IndexField
public Field getField()
IndexField
getField
in interface IndexField
public void setField(Field field)
IndexField
setField
in interface IndexField
public List<IndexFieldType> getFieldTypes()
IndexField
getFieldTypes
in interface IndexField
public void setFieldTypes(List<IndexFieldType> fieldTypes)
IndexField
setFieldTypes
in interface IndexField
public <G extends IndexField> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException
MultiTenantCloneable
public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {
CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context);
if (createResponse.isAlreadyPopulated()) {
return createResponse;
}
MyClass myClone = createResponse.getClone();
//copy extended field values on myClone here
return createResponse;
}
Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity:
public CreateResponse<G extends MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {
CreateResponse createResponse = context.createOrRetrieveCopyInstance(this);
MyClass myClone = createResponse.getClone();
//copy extended field values on myClone here
return createResponse;
}
createOrRetrieveCopyInstance
in interface MultiTenantCloneable<IndexField>
context
- a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException
- if there's a problem detected with the cloning configurationpublic String getMainEntityName()
getMainEntityName
in interface AdminMainEntity
Copyright © 2022. All rights reserved.