public class EntityDefinition extends java.lang.Object implements StructuredEntityI
Constructor and Description |
---|
EntityDefinition() |
EntityDefinition(java.lang.String _name,
java.lang.String _base,
java.lang.String _plural,
java.lang.String _sqlName) |
EntityDefinition(java.lang.String _name,
java.lang.String _base,
java.lang.String _plural,
java.lang.String _sqlName,
java.lang.String _description) |
EntityDefinition(java.lang.String _name,
java.lang.String _base,
java.lang.String _plural,
java.lang.String _sqlName,
java.lang.String _description,
boolean _persistent) |
EntityDefinition(java.lang.String _name,
java.lang.String _base,
java.lang.String _plural,
java.lang.String _sqlName,
java.lang.String _description,
boolean _persistent,
boolean _userAbstract) |
EntityDefinition(java.lang.String _name,
java.lang.String _base,
java.lang.String _plural,
java.lang.String _sqlName,
java.lang.String _description,
boolean _persistent,
boolean _userAbstract,
boolean _codeCustom) |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(AttributeDefinition ad) |
electric.xml.Element |
asXMLElement() |
EntityDefinition |
checkDescription(java.lang.String desc)
Checks the description of this
EntityDefinition (or its base entity) equals the given String |
static void |
checkValidSqlName(electric.xml.Element elem,
java.lang.String sqlNameToCheck)
Checks wether the given
String represents a valid sqlName for a CBOEntity . |
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,AttributeI> |
getAllAttributeMap() |
java.util.Map<java.lang.String,AttributeI> |
getAttributeAllMap() |
java.util.ArrayList<AttributeDefinition> |
getAttributeDefinitions() |
java.util.List<AttributeI> |
getAttributeList()
Returns a List with the AttributeI-s added by/defined exactly on this
CBOEntity . |
java.util.Map<java.lang.String,AttributeI> |
getAttributeMap() |
java.lang.String |
getBase() |
EntityI |
getBaseEntity() |
java.lang.Class |
getClazz() |
java.lang.String |
getDescription()
Returns the description String of this EntityI instance or of the first base EntityI that has a description.
|
electric.xml.Element |
getEl() |
java.lang.String |
getFolderName()
Returns the folder name of this
EntityI as used in the navigation tree in the GUI. |
java.lang.String |
getFQName() |
AttributeI[] |
getFrappingAttributes() |
java.util.Collection<SchemaInterfaceI> |
getImplementedSchemaInterfaces()
Return all implemented interfaces as SchemaInterfaceI objects, from which further information may be obtained.
|
java.lang.String |
getName()
Returns the name of this EntityI instance.
|
AttributeI[] |
getNonPersistentAttributes() |
java.lang.String |
getPackage() |
java.lang.String |
getPackageAsPath() |
java.lang.String |
getPlural() |
SchemaI |
getSchema() |
AttributeI |
getSingleAttribute(java.lang.String s)
Returns the
AttributeI for the specified name, which must match either
the plural or singular form. |
java.lang.String |
getSqlName() |
java.lang.String |
getSqlName(boolean quiet) |
java.util.List<EntityI> |
getSubEntityList()
return a List of EntityI containing every EntityI that has this StructuredEntityI as
StructuredEntityI.getBaseEntity() . |
int |
hashCode() |
boolean |
hasSubEntities() |
void |
initCaches()
Initialize a cache with all attribute of the current Entity
|
boolean |
isCustom() |
boolean |
isPersistent() |
boolean |
isUserAbstract() |
static EntityDefinition |
of(java.lang.String _name,
java.lang.String _base,
java.lang.String _plural,
java.lang.String _sqlName) |
static EntityDefinition |
of(java.lang.String _name,
java.lang.String _base,
java.lang.String _plural,
java.lang.String _sqlName,
java.lang.String _description) |
static EntityDefinition |
of(java.lang.String _name,
java.lang.String _base,
java.lang.String _plural,
java.lang.String _sqlName,
java.lang.String _description,
boolean _persistent) |
static EntityDefinition |
of(java.lang.String _name,
java.lang.String _base,
java.lang.String _plural,
java.lang.String _sqlName,
java.lang.String _description,
boolean _persistent,
boolean _userAbstract) |
static EntityDefinition |
of(java.lang.String _name,
java.lang.String _base,
java.lang.String _plural,
java.lang.String _sqlName,
java.lang.String _description,
boolean _persistent,
boolean _userAbstract,
boolean _codeCustom) |
void |
setAllAttributeMap(java.util.Map<java.lang.String,AttributeI> $39) |
void |
setAttributeAllMap(java.util.Map<java.lang.String,AttributeI> $38) |
void |
setAttributeDefinitions(java.util.ArrayList<AttributeDefinition> $31) |
void |
setAttributeList(java.util.List<AttributeI> $37) |
void |
setAttributeMap(java.util.Map<java.lang.String,AttributeI> $36) |
void |
setBase(java.lang.String $28) |
void |
setBaseEntity(EntityI $34) |
void |
setClazz(java.lang.Class $30) |
void |
setCustom(boolean $41) |
void |
setDescription(java.lang.String $35) |
void |
setEl(electric.xml.Element $43) |
void |
setFolderName(java.lang.String $42) |
void |
setName(java.lang.String $27) |
void |
setPersistent(boolean $32) |
void |
setPlural(java.lang.String $29) |
void |
setSchema(SchemaI $26) |
void |
setSqlName(java.lang.String s) |
void |
setSqlName(java.lang.String s,
boolean quiet) |
void |
setSubEntityList(java.util.List<EntityI> $40) |
void |
setUserAbstract(boolean $33) |
void |
writeSchemaDefinition(java.io.Writer writer) |
getClass, notify, notifyAll, toString, wait, wait, wait
getAllAttributeList, getAllAttributeList, getAllAttributeList, getAllAttributeListByType, getAllAttributeListByType, getAllAttributeListByType, getAllAttributeListByType, getAllAttributeListWithoutSubentities, getAllAttributeListWithoutSubentities, getAllSubEntityList, getAllSubEntityList, getAllSubEntityList, getAttChain, getAttChain, getAttribute, getPersistentBaseEntity, hasPersistentSubentity, isEffectivelyPersistent, isImplicitlyPersistent, isSubEntityOf, isSubEntityOf
getAttributeListByType, getAttributeListByType, getRelations, newInstance
public EntityDefinition(java.lang.String _name, java.lang.String _base, java.lang.String _plural, java.lang.String _sqlName)
public EntityDefinition(java.lang.String _name, java.lang.String _base, java.lang.String _plural, java.lang.String _sqlName, java.lang.String _description)
public EntityDefinition(java.lang.String _name, java.lang.String _base, java.lang.String _plural, java.lang.String _sqlName, java.lang.String _description, boolean _persistent)
public EntityDefinition(java.lang.String _name, java.lang.String _base, java.lang.String _plural, java.lang.String _sqlName, java.lang.String _description, boolean _persistent, boolean _userAbstract)
public EntityDefinition(java.lang.String _name, java.lang.String _base, java.lang.String _plural, java.lang.String _sqlName, java.lang.String _description, boolean _persistent, boolean _userAbstract, boolean _codeCustom)
public EntityDefinition()
public static EntityDefinition of(java.lang.String _name, java.lang.String _base, java.lang.String _plural, java.lang.String _sqlName)
public static EntityDefinition of(java.lang.String _name, java.lang.String _base, java.lang.String _plural, java.lang.String _sqlName, java.lang.String _description)
public static EntityDefinition of(java.lang.String _name, java.lang.String _base, java.lang.String _plural, java.lang.String _sqlName, java.lang.String _description, boolean _persistent)
public static EntityDefinition of(java.lang.String _name, java.lang.String _base, java.lang.String _plural, java.lang.String _sqlName, java.lang.String _description, boolean _persistent, boolean _userAbstract)
public static EntityDefinition of(java.lang.String _name, java.lang.String _base, java.lang.String _plural, java.lang.String _sqlName, java.lang.String _description, boolean _persistent, boolean _userAbstract, boolean _codeCustom)
public void initCaches()
public void addAttribute(AttributeDefinition ad)
public java.lang.String getPackage()
public java.lang.String getPackageAsPath()
public java.lang.String getFQName()
public java.lang.Class getClazz()
getClazz
in interface BasicEntityI
Class
representing this EntityI
public EntityDefinition checkDescription(java.lang.String desc)
EntityDefinition
(or its base entity) equals the given String
desc
- the String
to check for equality against the description of this EntityDefinition
(or its base entity)public java.lang.String getDescription()
BasicEntityI
getDescription
in interface BasicEntityI
public void setSqlName(java.lang.String s)
public void setSqlName(java.lang.String s, boolean quiet)
public java.lang.String getSqlName()
public java.lang.String getSqlName(boolean quiet)
public static void checkValidSqlName(electric.xml.Element elem, java.lang.String sqlNameToCheck) throws SchemaDefinitionException
String
represents a valid sqlName for a CBOEntity
.
Additionally to the checks in CBOSchema.checkSyntacticallyValidSqlName(Element, String, String)
it checks for a name clash with internally used names.EntityDefinitionException
- if the sqlName is not validSchemaDefinitionException
public java.util.Collection<SchemaInterfaceI> getImplementedSchemaInterfaces()
getImplementedSchemaInterfaces
in interface BasicEntityI
public boolean hasSubEntities()
hasSubEntities
in interface StructuredEntityI
true
if this EntityI
has sub entitiespublic AttributeI getSingleAttribute(java.lang.String s)
BasicEntityI
AttributeI
for the specified name, which must match either
the plural or singular form.getSingleAttribute
in interface BasicEntityI
s
- The name to get the AttributeI
for.AttributeI
for the specified name.public final AttributeI[] getNonPersistentAttributes()
public final AttributeI[] getFrappingAttributes()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void writeSchemaDefinition(java.io.Writer writer) throws java.io.IOException
java.io.IOException
public electric.xml.Element asXMLElement()
public SchemaI getSchema()
getSchema
in interface BasicEntityI
public void setSchema(SchemaI $26)
public java.lang.String getName()
BasicEntityI
getName
in interface BasicEntityI
public void setName(java.lang.String $27)
public java.lang.String getBase()
public void setBase(java.lang.String $28)
public java.lang.String getPlural()
getPlural
in interface BasicEntityI
public void setPlural(java.lang.String $29)
public void setClazz(java.lang.Class $30)
public java.util.ArrayList<AttributeDefinition> getAttributeDefinitions()
public void setAttributeDefinitions(java.util.ArrayList<AttributeDefinition> $31)
public boolean isPersistent()
isPersistent
in interface BasicEntityI
true
if this EntityI is defined as persistent in the schema.public void setPersistent(boolean $32)
public boolean isUserAbstract()
isUserAbstract
in interface BasicEntityI
true
if this EntityI is defined as abstract in the schema.public void setUserAbstract(boolean $33)
public EntityI getBaseEntity()
getBaseEntity
in interface StructuredEntityI
EntityI
of this EntityI
public void setBaseEntity(EntityI $34)
public void setDescription(java.lang.String $35)
public java.util.Map<java.lang.String,AttributeI> getAttributeMap()
public void setAttributeMap(java.util.Map<java.lang.String,AttributeI> $36)
public java.util.List<AttributeI> getAttributeList()
BasicEntityI
CBOEntity
.
Excludes inherited Attributes.getAttributeList
in interface BasicEntityI
CBOEntity
.public void setAttributeList(java.util.List<AttributeI> $37)
public java.util.Map<java.lang.String,AttributeI> getAttributeAllMap()
public void setAttributeAllMap(java.util.Map<java.lang.String,AttributeI> $38)
public java.util.Map<java.lang.String,AttributeI> getAllAttributeMap()
public void setAllAttributeMap(java.util.Map<java.lang.String,AttributeI> $39)
public java.util.List<EntityI> getSubEntityList()
StructuredEntityI
StructuredEntityI.getBaseEntity()
.
Does not include this StructuredEntityI or transitive sub-EntityI-s.getSubEntityList
in interface StructuredEntityI
public void setSubEntityList(java.util.List<EntityI> $40)
public boolean isCustom()
isCustom
in interface BasicEntityI
true
, if this EntityI has a custom implementation and not only generated codepublic void setCustom(boolean $41)
public java.lang.String getFolderName()
BasicEntityI
EntityI
as used in the navigation tree in the GUI.getFolderName
in interface BasicEntityI
public void setFolderName(java.lang.String $42)
public electric.xml.Element getEl()
public void setEl(electric.xml.Element $43)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.