Klasse EntityDataElement

java.lang.Object
de.esoco.lib.property.AbstractStringProperties
de.esoco.lib.property.StringProperties
Alle implementierten Schnittstellen:
de.esoco.lib.model.DataModel<DataElement<?>>, de.esoco.lib.property.HasProperties, de.esoco.lib.property.MutableProperties, Serializable, Iterable<DataElement<?>>

public class EntityDataElement extends DataElementList
A data element implementation that holds the attributes of an entity.
Siehe auch:
  • Felddetails

    • CHILDREN_ELEMENT

      public static final String CHILDREN_ELEMENT
      The name of the attribute data element containing the child
      Siehe auch:
  • Konstruktordetails

    • EntityDataElement

      public EntityDataElement(String name, String resourceId, String childPrefix, List<DataElement<?>> attributes, Set<DataElement.Flag> flags)
      Creates a new instance.
      Parameter:
      name - The name of this data element
      resourceId - The resource to label the data element with
      childPrefix - The prefix string for child elements
      attributes - The child elements that represent the entity attributes (including children)
      flags - The optional flags for this data element
  • Methodendetails

    • copy

      public EntityDataElement copy(DataElement.CopyMode mode, de.esoco.lib.property.PropertyName<?>... copyProperties)
      Returns a copy of this data element that contains all or a subset of it's current state. Always copied are the name and flags. Never copied is the parent reference because upon copying typically a reference to a copied parent needs to be set. The further data the copy contains depends on the copy mode:

      The copy instance is created by invoking DataElement.newInstance() which has the recommendation to overwrite the return type to the concrete subtype to prevent the need for casting by the invoking code. For the same reason it is recommended that subclasses also override this method with the concrete return type and cast the result of super.copy() to that type.

      Setzt außer Kraft:
      copy in Klasse DataElementList
      Parameter:
      mode - The copy mode
      copyProperties - An optional list of properties to copy. If not provided all properties will be copied (unless the mode is DataElement.CopyMode.PLACEHOLDER)
      Gibt zurück:
      The copied instance
    • getChildResourceIdPrefix

      protected String getChildResourceIdPrefix()
      Overridden to return the simple name of the entity class.
      Setzt außer Kraft:
      getChildResourceIdPrefix in Klasse DataElementList
      Gibt zurück:
      The child resource id prefix
      Siehe auch:
    • newInstance

      protected EntityDataElement newInstance()
      Returns a new instance of the respective data element sub-type on which it is invoked. This is needed for GWT which doesn't support reflection. Used by DataElement.copy(CopyMode, PropertyName...) for cloning an instance. Implementations should overwrite the return type with their concrete type to prevent the need for casting by the invoking code.
      Setzt außer Kraft:
      newInstance in Klasse DataElementList
      Gibt zurück:
      The new instance