public class EntityDef
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
EntityDef.EntityType
Type of entity
|
Constructor and Description |
---|
EntityDef(java.lang.String name, EntityDef.EntityType entityType, java.lang.String idAttribute)
Constructs Entity definition.
|
EntityDef(java.lang.String name, EntityDef.EntityType entityType, java.lang.String idAttribute, boolean createAllowed, boolean modifyAllowed, boolean deleteAllowed, boolean searchAllowed)
Consructs Entity definition.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(AttributeRef attr)
Add new attribute reference to entity
|
boolean |
equals(java.lang.Object obj)
Checks if the given object is equals to this one
|
AttributeRef |
getAttribute(java.lang.String name)
Gets entity attribute reference for given attribute name
|
java.util.List<AttributeRef> |
getAttributes()
Gets entity attributes
|
EntityDef.EntityType |
getEntityType()
Gets entity type
|
java.lang.String |
getIdAttribute()
Gets ID attribute name of the entity
|
java.lang.String |
getName()
Gets Entity name
|
boolean |
isCreateAllowed()
Gets create allowed value
|
boolean |
isDeleteAllowed()
Gets delete allowed value
|
boolean |
isModifyAllowed()
Gets entity modify allowed value
|
boolean |
isSearchAllowed()
Gets search allowed value
|
void |
setAttributes(java.util.List<AttributeRef> attributes)
Sets entity attributes
|
void |
setCreateAllowed(boolean createAllowed)
Sets create allowed value
|
void |
setDeleteAllowed(boolean deleteAllowed)
Sets delete allowed value
|
void |
setEntityType(EntityDef.EntityType entityType)
Sets entity type value
|
void |
setIdAttribute(java.lang.String idAttribute)
Sets ID attribute name for the entity
|
void |
setModifyAllowed(boolean modifyAllowed)
Sets modify allowed value
|
void |
setSearchAllowed(boolean searchAllowed)
Sets search allowed value
|
public EntityDef(java.lang.String name, EntityDef.EntityType entityType, java.lang.String idAttribute)
name
- Name of the entityentityType
- Entity typeidAttribute
- Name of the attribute that uniquely identifies the entitypublic EntityDef(java.lang.String name, EntityDef.EntityType entityType, java.lang.String idAttribute, boolean createAllowed, boolean modifyAllowed, boolean deleteAllowed, boolean searchAllowed)
name
- Name of the entityentityType
- Entity typeidAttribute
- Name of the attribute that uniquely identifies the entitycreateAllowed
- Is create entity allowed ?modifyAllowed
- Is modify entity allowed ?deleteAllowed
- Is delete entity allowed ?searchAllowed
- Is search entities allowed ?public java.lang.String getName()
public void setEntityType(EntityDef.EntityType entityType)
entityType
- Entity typepublic EntityDef.EntityType getEntityType()
public void setIdAttribute(java.lang.String idAttribute)
idAttribute
- Name of the attribute that uniquely identifies the entitypublic java.lang.String getIdAttribute()
public void setCreateAllowed(boolean createAllowed)
createAllowed
- true if entity creation to be allowed ; false otherwisepublic boolean isCreateAllowed()
public void setModifyAllowed(boolean modifyAllowed)
modifyAllowed
- true if entity modification to be allowed ; false otherwisepublic boolean isModifyAllowed()
public void setDeleteAllowed(boolean deleteAllowed)
deleteAllowed
- true if entity deletion to be allowed ; false otherwisepublic boolean isDeleteAllowed()
public void setSearchAllowed(boolean searchAllowed)
searchAllowed
- true if entities search to be allowed ; false otherwisepublic boolean isSearchAllowed()
public void setAttributes(java.util.List<AttributeRef> attributes)
attributes
- List of entity attribute referencespublic java.util.List<AttributeRef> getAttributes()
public AttributeRef getAttribute(java.lang.String name)
name
- Attribute namepublic void addAttribute(AttributeRef attr)
attr
- Attribute refencespublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object