|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.map.Entity
org.apache.cayenne.map.DbEntity
org.apache.cayenne.map.DerivedDbEntity
public class DerivedDbEntity
DbEntity subclass that is based on another DbEntity and allows to define complex database expressions like GROUP BY and aggregate functions.
Field Summary | |
---|---|
protected java.lang.String |
parentEntityName
|
Fields inherited from class org.apache.cayenne.map.DbEntity |
---|
catalog, generatedAttributes, primaryKey, primaryKeyGenerator, schema |
Fields inherited from class org.apache.cayenne.map.Entity |
---|
attributes, dataMap, name, PATH_SEPARATOR, relationships |
Constructor Summary | |
---|---|
DerivedDbEntity()
Constructor for DerivedDbEntity. |
|
DerivedDbEntity(java.lang.String name)
Constructor for DerivedDbEntity. |
|
DerivedDbEntity(java.lang.String name,
DbEntity parentEntity)
Constructor for DerivedDbEntity. |
Method Summary | |
---|---|
void |
encodeAsXML(XMLEncoder encoder)
Prints itself as XML to the provided XMLEncoder. |
java.lang.String |
getCatalog()
Returns catalog of the parent entity. |
java.lang.String |
getFullyQualifiedName()
Returns table name including schema, if present. |
java.util.List |
getGroupByAttributes()
Returns attributes used in GROUP BY as an unmodifiable list. |
DbEntity |
getParentEntity()
Returns the parentEntity. |
java.lang.String |
getParentEntityName()
Returns the parentEntityName. |
java.lang.String |
getSchema()
Returns schema of the parent entity. |
void |
removeAttribute(java.lang.String attrName)
Removes attribute from the entity, removes any relationship joins containing this attribute. |
void |
resetToParentView()
Removes all attributes and relationships, and replaces them with the data of the parent entity. |
void |
setCatalog(java.lang.String catalog)
Throws exception. |
void |
setParentEntity(DbEntity parentEntity)
Sets the parent entity of this derived DbEntity. |
void |
setParentEntityName(java.lang.String parentEntityName)
Sets the parentEntityName. |
void |
setSchema(java.lang.String schema)
Throws exception. |
Methods inherited from class org.apache.cayenne.map.DbEntity |
---|
addAttribute, clearAttributes, dbAttributeAdded, dbAttributeChanged, dbAttributeRemoved, dbEntityAdded, dbEntityChanged, dbEntityRemoved, dbRelationshipAdded, dbRelationshipChanged, dbRelationshipRemoved, getGeneratedAttributes, getPrimaryKey, getPrimaryKeyGenerator, isFullReplacementIdAttached, resolvePathComponents, setPrimaryKeyGenerator, translateToRelatedEntity |
Methods inherited from class org.apache.cayenne.map.Entity |
---|
addRelationship, clearRelationships, getAnyRelationship, getAttribute, getAttributeMap, getAttributes, getDataMap, getName, getParent, getRelationship, getRelationshipMap, getRelationships, lastPathComponent, removeRelationship, resolvePathComponents, setDataMap, setName, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String parentEntityName
Constructor Detail |
---|
public DerivedDbEntity()
public DerivedDbEntity(java.lang.String name)
name
- public DerivedDbEntity(java.lang.String name, DbEntity parentEntity)
Method Detail |
---|
public void encodeAsXML(XMLEncoder encoder)
encodeAsXML
in interface XMLSerializable
encodeAsXML
in class DbEntity
public void resetToParentView()
public DbEntity getParentEntity()
public void setParentEntity(DbEntity parentEntity)
public java.util.List getGroupByAttributes()
public java.lang.String getFullyQualifiedName()
DbEntity
getFullyQualifiedName
in class DbEntity
DbEntity.getFullyQualifiedName()
public java.lang.String getSchema()
getSchema
in class DbEntity
public void setSchema(java.lang.String schema)
setSchema
in class DbEntity
public java.lang.String getCatalog()
getCatalog
in class DbEntity
public void setCatalog(java.lang.String catalog)
setCatalog
in class DbEntity
public void removeAttribute(java.lang.String attrName)
DbEntity
removeAttribute
in class DbEntity
Entity.removeAttribute(String)
public java.lang.String getParentEntityName()
public void setParentEntityName(java.lang.String parentEntityName)
parentEntityName
- The parentEntityName to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |