Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.map
Class DerivedDbEntity

    java.lang.Object
      org.apache.cayenne.map.Entity
          org.apache.cayenne.map.DbEntity
              org.apache.cayenne.map.DerivedDbEntity

All Implemented Interfaces:
  Serializable, EventListener, DbAttributeListener, DbEntityListener, DbRelationshipListener, CayenneMapEntry, XMLSerializable

Deprecated. since 3.0M2 (scheduled for removal in 3.0M3) this type of mapping is no longer supported.

    public class DerivedDbEntity

extends DbEntity

DbEntity subclass that is based on another DbEntity and allows to define complex database expressions like GROUP BY and aggregate functions.

Author:
  Andrus Adamchik
See Also:
  Serialized Form

Field Summary
`protected String` | `parentEntityName` Deprecated.

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()` Deprecated. Constructor for DerivedDbEntity.
`DerivedDbEntity(String name)` Deprecated. Constructor for DerivedDbEntity.
`DerivedDbEntity(String name, DbEntity parentEntity)` Deprecated. Constructor for DerivedDbEntity.

Method Summary
`void` | `encodeAsXML(XMLEncoder encoder)` Deprecated. Prints itself as XML to the provided XMLEncoder.
`String` | `getCatalog()` Deprecated. Returns catalog of the parent entity.
`String` | `getFullyQualifiedName()` Deprecated. Returns table name including schema, if present.
`List` | `getGroupByAttributes()` Deprecated. Returns attributes used in GROUP BY as an unmodifiable list.
`DbEntity` | `getParentEntity()` Deprecated. Returns the parentEntity.
`String` | `getParentEntityName()` Deprecated. Returns the parentEntityName.
`String` | `getSchema()` Deprecated. Returns schema of the parent entity.
`void` | `removeAttribute(String attrName)` Deprecated. Removes attribute from the entity, removes any relationship joins containing this attribute.
`void` | `resetToParentView()` Deprecated. Removes all attributes and relationships, and replaces them with the data of the parent entity.
`void` | `setCatalog(String catalog)` Deprecated. Throws exception.
`void` | `setParentEntity(DbEntity parentEntity)` Deprecated. Sets the parent entity of this derived DbEntity.
`void` | `setParentEntityName(String parentEntityName)` Deprecated. Sets the parentEntityName.
`void` | `setSchema(String schema)` Deprecated. 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, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### parentEntityName

    protected String parentEntityName

  Deprecated.

Constructor Detail

### DerivedDbEntity

    public DerivedDbEntity()

  Deprecated.
  Constructor for DerivedDbEntity.

### DerivedDbEntity

    public DerivedDbEntity(String name)

  Deprecated.
  Constructor for DerivedDbEntity.

  Parameters:
    `name` -

### DerivedDbEntity

    public DerivedDbEntity(String name,
                           DbEntity parentEntity)

  Deprecated.
  Constructor for DerivedDbEntity. Creates a derived entity with the attribute set of a parent entity.

Method Detail

### encodeAsXML

    public void encodeAsXML(XMLEncoder encoder)

  Deprecated.
  Prints itself as XML to the provided XMLEncoder.

  Specified by:
    `encodeAsXML` in interface `XMLSerializable`
  Overrides:
    `encodeAsXML` in class `DbEntity`
  Since:
    1.1

### resetToParentView

    public void resetToParentView()

  Deprecated.
  Removes all attributes and relationships, and replaces them with the data of the parent entity.

### getParentEntity

    public DbEntity getParentEntity()

  Deprecated.
  Returns the parentEntity.

  Returns:
    DbEntity

### setParentEntity

    public void setParentEntity(DbEntity parentEntity)

  Deprecated.
  Sets the parent entity of this derived DbEntity.

### getGroupByAttributes

    public List getGroupByAttributes()

  Deprecated.
  Returns attributes used in GROUP BY as an unmodifiable list.

### getFullyQualifiedName

    public String getFullyQualifiedName()

  Deprecated.
  Description copied from class: `DbEntity`
  Returns table name including schema, if present.

  Overrides:
    `getFullyQualifiedName` in class `DbEntity`
  See Also:
    `DbEntity.getFullyQualifiedName()`

### getSchema

    public String getSchema()

  Deprecated.
  Returns schema of the parent entity.

  Overrides:
    `getSchema` in class `DbEntity`
  Returns:
    table's schema, null if not set.

### setSchema

    public void setSchema(String schema)

  Deprecated.
  Throws exception.

  Overrides:
    `setSchema` in class `DbEntity`

### getCatalog

    public String getCatalog()

  Deprecated.
  Returns catalog of the parent entity.

  Overrides:
    `getCatalog` in class `DbEntity`

### setCatalog

    public void setCatalog(String catalog)

  Deprecated.
  Throws exception.

  Overrides:
    `setCatalog` in class `DbEntity`

### removeAttribute

    public void removeAttribute(String attrName)

  Deprecated.
  Description copied from class: `DbEntity`
  Removes attribute from the entity, removes any relationship joins containing this attribute.

  Overrides:
    `removeAttribute` in class `DbEntity`
  See Also:
    `Entity.removeAttribute(String)`

### getParentEntityName

    public String getParentEntityName()

  Deprecated.
  Returns the parentEntityName.

  Returns:
    String

### setParentEntityName

    public void setParentEntityName(String parentEntityName)

  Deprecated.
  Sets the parentEntityName.

  Parameters:
    `parentEntityName` - The parentEntityName to set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.