Package com.ocs.dynamo.domain.model.impl
Class LazyEntityModelWrapper<T>
- java.lang.Object
-
- com.ocs.dynamo.domain.model.impl.LazyEntityModelWrapper<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
EntityModel<T>
public class LazyEntityModelWrapper<T> extends Object implements EntityModel<T>
A wrapper that adds lazy loading to an entity model definition- Author:
- bas.rutten
-
-
Field Summary
-
Fields inherited from interface com.ocs.dynamo.domain.model.EntityModel
ALLOWED_EXTENSIONS, ATTRIBUTE_GROUP, ATTRIBUTE_NAMES, ATTRIBUTE_ORDER, CASCADE, CASCADE_FILTER_PATH, CASCADE_MODE, CASCADE_OFF, COMPLEX_EDITABLE, CURRENCY, CUSTOM, CUSTOM_TYPE, CUSTOM_VALUE, DATE_TYPE, DEFAULT_GROUP, DEFAULT_VALUE, DESCRIPTION, DISPLAY_FORMAT, DISPLAY_NAME, DISPLAY_NAME_PLURAL, DISPLAY_PROPERTY, EDITABLE, EMBEDDED, FALSE_REPRESENTATION, GRID_SELECT_MODE, GROUP_TOGETHER_WITH, IGNORE_IN_SEARCH_FILTER, IMAGE, MAIN, MAX_LENGTH, MAX_LENGTH_IN_GRID, MAX_VALUE, MESSAGE_KEY, MIN_LENGTH, MIN_VALUE, MULTIPLE_SEARCH, NAVIGABLE, PERCENTAGE, PRECISION, PROMPT, QUICK_ADD_PROPERTY, READ_ONLY, REPLACEMENT_SEARCH_PATH, REPLACEMENT_SORT_PATH, REQUIRED_FOR_SEARCHING, SEARCH_CASE_SENSITIVE, SEARCH_DATE_ONLY, SEARCH_EXACT_VALUE, SEARCH_PREFIX_ONLY, SEARCH_SELECT_MODE, SEARCHABLE, SELECT_MODE, SORT_ORDER, SORTABLE, STYLES, TEXTFIELD_MODE, THOUSANDS_GROUPING, TRUE_REPRESENTATION, URL, VISIBLE, VISIBLE_IN_GRID, WEEK
-
-
Constructor Summary
Constructors Constructor Description LazyEntityModelWrapper(EntityModelFactory factory, String reference, Class<T> entityClass)Constructor
-
Method Summary
-
-
-
Constructor Detail
-
LazyEntityModelWrapper
public LazyEntityModelWrapper(EntityModelFactory factory, String reference, Class<T> entityClass)
Constructor- Parameters:
factory- the entity model factoryreference- the reference (unique name of the model)entityClass- the entity class
-
-
Method Detail
-
addAttributeModel
public void addAttributeModel(String attributeGroup, AttributeModel model, AttributeModel existingModel)
- Specified by:
addAttributeModelin interfaceEntityModel<T>
-
getAttributeGroups
public List<String> getAttributeGroups()
- Specified by:
getAttributeGroupsin interfaceEntityModel<T>
-
getAttributeModel
public AttributeModel getAttributeModel(String attributeName)
- Specified by:
getAttributeModelin interfaceEntityModel<T>
-
getAttributeModels
public List<AttributeModel> getAttributeModels()
- Specified by:
getAttributeModelsin interfaceEntityModel<T>
-
getAttributeModelsForGroup
public List<AttributeModel> getAttributeModelsForGroup(String group)
- Specified by:
getAttributeModelsForGroupin interfaceEntityModel<T>
-
getAttributeModelsForType
public List<AttributeModel> getAttributeModelsForType(AttributeType attributeType, Class<?> type)
- Specified by:
getAttributeModelsForTypein interfaceEntityModel<T>
-
getCascadeAttributeModels
public List<AttributeModel> getCascadeAttributeModels()
- Specified by:
getCascadeAttributeModelsin interfaceEntityModel<T>
-
getDelegate
protected EntityModel<T> getDelegate()
-
getDescription
public String getDescription(Locale locale)
- Specified by:
getDescriptionin interfaceEntityModel<T>
-
getDisplayProperty
public String getDisplayProperty()
- Specified by:
getDisplayPropertyin interfaceEntityModel<T>
-
getEntityClass
public Class<T> getEntityClass()
- Specified by:
getEntityClassin interfaceEntityModel<T>
-
getIdAttributeModel
public AttributeModel getIdAttributeModel()
- Specified by:
getIdAttributeModelin interfaceEntityModel<T>
-
getMainAttributeModel
public AttributeModel getMainAttributeModel()
- Specified by:
getMainAttributeModelin interfaceEntityModel<T>
-
getReference
public String getReference()
- Specified by:
getReferencein interfaceEntityModel<T>
-
getRequiredForSearchingAttributeModels
public List<AttributeModel> getRequiredForSearchingAttributeModels()
- Specified by:
getRequiredForSearchingAttributeModelsin interfaceEntityModel<T>
-
getSortOrder
public Map<AttributeModel,Boolean> getSortOrder()
- Specified by:
getSortOrderin interfaceEntityModel<T>
-
isAttributeGroupVisible
public boolean isAttributeGroupVisible(String group, boolean readOnly)
- Specified by:
isAttributeGroupVisiblein interfaceEntityModel<T>
-
usesDefaultGroupOnly
public boolean usesDefaultGroupOnly()
- Specified by:
usesDefaultGroupOnlyin interfaceEntityModel<T>
-
addAttributeGroup
public void addAttributeGroup(String attributeGroup)
- Specified by:
addAttributeGroupin interfaceEntityModel<T>
-
getDisplayName
public String getDisplayName(Locale locale)
- Specified by:
getDisplayNamein interfaceEntityModel<T>
-
getDisplayNamePlural
public String getDisplayNamePlural(Locale locale)
- Specified by:
getDisplayNamePluralin interfaceEntityModel<T>
-
-