@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()
IndexFieldgetId in interface IndexFieldpublic void setId(Long id)
IndexFieldsetId in interface IndexFieldpublic Boolean getSearchable()
IndexFieldgetSearchable in interface IndexFieldpublic void setSearchable(Boolean searchable)
setSearchable in interface IndexFieldpublic Field getField()
IndexFieldgetField in interface IndexFieldpublic void setField(Field field)
IndexFieldsetField in interface IndexFieldpublic List<IndexFieldType> getFieldTypes()
IndexFieldgetFieldTypes in interface IndexFieldpublic void setFieldTypes(List<IndexFieldType> fieldTypes)
IndexFieldsetFieldTypes in interface IndexFieldpublic <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 AdminMainEntityCopyright © 2022. All rights reserved.