congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
EISCompositeCollectionMapping
Code IndexAdd Tabnine to your IDE (free)

How to use
EISCompositeCollectionMapping
in
org.eclipse.persistence.eis.mappings

Best Java code snippets using org.eclipse.persistence.eis.mappings.EISCompositeCollectionMapping (Showing top 20 results out of 315)

origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * The mapping is initialized with the given session. This mapping is fully initialized
 * after this.
 */
public void initialize(AbstractSession session) throws DescriptorException {
  super.initialize(session);
  if (this.getContainerPolicy() instanceof MapContainerPolicy) {
    ((MapContainerPolicy)getContainerPolicy()).setElementClass(this.getReferenceClass());
  }
}
origin: com.haulmont.thirdparty/eclipselink

  @Override
  protected AbstractRecord buildCompositeRow(Object attributeValue, AbstractSession session, AbstractRecord parentRow, WriteType writeType) {
    if (((EISDescriptor)getDescriptor()).isXMLFormat()) {
      XMLObjectBuilder objectBuilder = (XMLObjectBuilder)getReferenceDescriptor(attributeValue, session).getObjectBuilder();
      return objectBuilder.buildRow(attributeValue, session, getField(), (XMLRecord)parentRow);
    } else {
      return this.getObjectBuilder(attributeValue, session).buildRow(attributeValue, session, writeType);
    }
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Set the name of the field mapped by the mapping.
 */
public void setFieldName(String fieldName) {
  this.setField(new DatabaseField(fieldName));
}
origin: org.eclipse.persistence/org.eclipse.persistence.dbws

if (mapping.isEISMapping()) {
  EISCompositeCollectionMapping collectionMapping = (EISCompositeCollectionMapping) mapping;
  Class collectionClass = collectionMapping.getContainerPolicy().getContainerClass();
  String collectionType = getSimplePublicCollectionTypeName(collectionClass);
  if (collectionType == null) {
    collectionType = collectionClass.getSimpleName();
  if (collectionMapping.getReferenceClass() != null) {
    collectionName = collectionMapping.getReferenceClass().getSimpleName();
  if ((collectionName == null) && (collectionMapping.getAttributeClassification() != null)) {
    collectionName = collectionMapping.getAttributeClassification().getSimpleName();
  if (collectionMapping.getContainerPolicy().isMapPolicy()) {
    String mapKeyType = ((MapContainerPolicy) collectionMapping.getContainerPolicy()).getKeyType().getClass().getSimpleName();
    target = collectionType + "<" + mapKeyType + ", " + collectionName + ">";
  } else {
origin: com.haulmont.thirdparty/eclipselink

  private Class getCollectionGenericClass(DatabaseMapping mapping) {
    Class collectionName = null;
    if (mapping.isEISMapping()) {
      final EISCompositeCollectionMapping collectionMapping = (EISCompositeCollectionMapping) mapping;
      if (collectionMapping.getReferenceClass() != null) {
        collectionName = collectionMapping.getReferenceClass();
      }
      if ((collectionName == null) && (collectionMapping.getAttributeClassification() != null)) {
        collectionName = collectionMapping.getAttributeClassification();
      }
    } else {
      final CollectionMapping collectionMapping = (CollectionMapping) mapping;
      if (collectionMapping.getReferenceClass() != null) {
        collectionName = collectionMapping.getReferenceClass();
      }
      if ((collectionName == null) && (collectionMapping.getAttributeClassification() != null)) {
        collectionName = collectionMapping.getAttributeClassification();
      }
    }

    return collectionName;
  }
}
origin: com.haulmont.thirdparty/eclipselink

  xmlElement.setContainerType(((EISCompositeDirectCollectionMapping) mapping).getContainerPolicy().getContainerClassName());
} else if (mapping instanceof EISCompositeCollectionMapping) {
  xmlElement.setContainerType(((EISCompositeCollectionMapping) mapping).getContainerPolicy().getContainerClassName());
  xmlElement.setType(((EISCompositeCollectionMapping) mapping).getReferenceClassName());
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Return the name of the field mapped by the mapping.
 */
public String getFieldName() {
  return this.getField().getName();
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Return a new aggregate collection/element collection mapping for this type of descriptor.
 */
@Override
public DatabaseMapping newAggregateCollectionMapping() {
  return new EISCompositeCollectionMapping();
}
origin: org.eclipse.persistence/org.eclipse.persistence.dbws

private void setRelationshipInfo(Object entity) {
  if ((entity != null) && (entity instanceof PersistenceWeavedRest)) {
    ClassDescriptor descriptor = getServerSession().getClassDescriptor(entity.getClass());
    if (descriptor != null) {
      ((PersistenceWeavedRest) entity)._persistence_setRelationships(new ArrayList<RelationshipInfo>());
      for (DatabaseMapping mapping : descriptor.getMappings()) {
        if (mapping.isForeignReferenceMapping()) {
          ForeignReferenceMapping frMapping = (ForeignReferenceMapping) mapping;
          RelationshipInfo info = new RelationshipInfo();
          info.setAttributeName(frMapping.getAttributeName());
          info.setOwningEntity(entity);
          info.setOwningEntityAlias(descriptor.getAlias());
          info.setPersistencePrimaryKey(descriptor.getObjectBuilder().extractPrimaryKeyFromObject(entity, (AbstractSession) getServerSession()));
          ((PersistenceWeavedRest) entity)._persistence_getRelationships().add(info);
        } else if (mapping.isEISMapping()) {
          if (mapping instanceof EISCompositeCollectionMapping) {
            EISCompositeCollectionMapping eisMapping = (EISCompositeCollectionMapping) mapping;
            RelationshipInfo info = new RelationshipInfo();
            info.setAttributeName(eisMapping.getAttributeName());
            info.setOwningEntity(entity);
            info.setOwningEntityAlias(descriptor.getAlias());
            info.setPersistencePrimaryKey(descriptor.getObjectBuilder().extractPrimaryKeyFromObject(entity, (AbstractSession) getServerSession()));
            ((PersistenceWeavedRest) entity)._persistence_getRelationships().add(info);
          }
        }
      }
    }
  }
}
origin: com.haulmont.thirdparty/eclipselink

if (mapping.isEISMapping()) {
  EISCompositeCollectionMapping collectionMapping = (EISCompositeCollectionMapping) mapping;
  Class collectionClass = collectionMapping.getContainerPolicy().getContainerClass();
  String collectionType = getSimplePublicCollectionTypeName(collectionClass);
  if (collectionType == null) {
    collectionType = collectionClass.getSimpleName();
  if (collectionMapping.getReferenceClass() != null) {
    collectionName = collectionMapping.getReferenceClass().getSimpleName();
  if ((collectionName == null) && (collectionMapping.getAttributeClassification() != null)) {
    collectionName = collectionMapping.getAttributeClassification().getSimpleName();
  if (collectionMapping.getContainerPolicy().isMapPolicy()) {
    String mapKeyType = ((MapContainerPolicy) collectionMapping.getContainerPolicy()).getKeyType().getClass().getSimpleName();
    target = collectionType + "<" + mapKeyType + ", " + collectionName + ">";
  } else {
origin: org.eclipse.persistence/org.eclipse.persistence.dbws

  private Class getCollectionGenericClass(DatabaseMapping mapping) {
    Class collectionName = null;
    if (mapping.isEISMapping()) {
      final EISCompositeCollectionMapping collectionMapping = (EISCompositeCollectionMapping) mapping;
      if (collectionMapping.getReferenceClass() != null) {
        collectionName = collectionMapping.getReferenceClass();
      }
      if ((collectionName == null) && (collectionMapping.getAttributeClassification() != null)) {
        collectionName = collectionMapping.getAttributeClassification();
      }
    } else {
      final CollectionMapping collectionMapping = (CollectionMapping) mapping;
      if (collectionMapping.getReferenceClass() != null) {
        collectionName = collectionMapping.getReferenceClass();
      }
      if ((collectionName == null) && (collectionMapping.getAttributeClassification() != null)) {
        collectionName = collectionMapping.getAttributeClassification();
      }
    }

    return collectionName;
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.dbws

  xmlElement.setContainerType(((EISCompositeDirectCollectionMapping) mapping).getContainerPolicy().getContainerClassName());
} else if (mapping instanceof EISCompositeCollectionMapping) {
  xmlElement.setContainerType(((EISCompositeCollectionMapping) mapping).getContainerPolicy().getContainerClassName());
  xmlElement.setType(((EISCompositeCollectionMapping) mapping).getReferenceClassName());
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Get the XPath String
 *
 * @return String the XPath String associated with this Mapping
 *
 */
public String getXPath() {
  return getField().getName();
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Return a new aggregate collection/element collection mapping for this type of descriptor.
 */
@Override
public DatabaseMapping newAggregateCollectionMapping() {
  return new EISCompositeCollectionMapping();
}
origin: com.haulmont.thirdparty/eclipselink

private void setRelationshipInfo(Object entity) {
  if ((entity != null) && (entity instanceof PersistenceWeavedRest)) {
    ClassDescriptor descriptor = getServerSession().getClassDescriptor(entity.getClass());
    if (descriptor != null) {
      ((PersistenceWeavedRest) entity)._persistence_setRelationships(new ArrayList<RelationshipInfo>());
      for (DatabaseMapping mapping : descriptor.getMappings()) {
        if (mapping.isForeignReferenceMapping()) {
          ForeignReferenceMapping frMapping = (ForeignReferenceMapping) mapping;
          RelationshipInfo info = new RelationshipInfo();
          info.setAttributeName(frMapping.getAttributeName());
          info.setOwningEntity(entity);
          info.setOwningEntityAlias(descriptor.getAlias());
          info.setPersistencePrimaryKey(descriptor.getObjectBuilder().extractPrimaryKeyFromObject(entity, (AbstractSession) getServerSession()));
          ((PersistenceWeavedRest) entity)._persistence_getRelationships().add(info);
        } else if (mapping.isEISMapping()) {
          if (mapping instanceof EISCompositeCollectionMapping) {
            EISCompositeCollectionMapping eisMapping = (EISCompositeCollectionMapping) mapping;
            RelationshipInfo info = new RelationshipInfo();
            info.setAttributeName(eisMapping.getAttributeName());
            info.setOwningEntity(entity);
            info.setOwningEntityAlias(descriptor.getAlias());
            info.setPersistencePrimaryKey(descriptor.getObjectBuilder().extractPrimaryKeyFromObject(entity, (AbstractSession) getServerSession()));
            ((PersistenceWeavedRest) entity)._persistence_getRelationships().add(info);
          }
        }
      }
    }
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  protected AbstractRecord buildCompositeRow(Object attributeValue, AbstractSession session, AbstractRecord parentRow) {
    if (((EISDescriptor)getDescriptor()).getDataFormat() == EISDescriptor.XML) {
      XMLObjectBuilder objectBuilder = (XMLObjectBuilder)getReferenceDescriptor(attributeValue, session).getObjectBuilder();
      return objectBuilder.buildRow(attributeValue, session, getField(), (XMLRecord)parentRow);
    } else {
      return this.getObjectBuilder(attributeValue, session).buildRow(attributeValue, session);
    }
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * The mapping is initialized with the given session. This mapping is fully initialized
 * after this.
 */
public void initialize(AbstractSession session) throws DescriptorException {
  super.initialize(session);
  if (this.getContainerPolicy() instanceof MapContainerPolicy) {
    ((MapContainerPolicy)getContainerPolicy()).setElementClass(this.getReferenceClass());
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Set the name of the field mapped by the mapping.
 */
public void setFieldName(String fieldName) {
  this.setField(new DatabaseField(fieldName));
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Get the XPath String
 *
 * @return String the XPath String associated with this Mapping
 *
 */
public String getXPath() {
  return getField().getName();
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

  @Override
  protected AbstractRecord buildCompositeRow(Object attributeValue, AbstractSession session, AbstractRecord parentRow, WriteType writeType) {
    if (((EISDescriptor)getDescriptor()).isXMLFormat()) {
      XMLObjectBuilder objectBuilder = (XMLObjectBuilder)getReferenceDescriptor(attributeValue, session).getObjectBuilder();
      return objectBuilder.buildRow(attributeValue, session, getField(), (XMLRecord)parentRow);
    } else {
      return this.getObjectBuilder(attributeValue, session).buildRow(attributeValue, session, writeType);
    }
  }
}
org.eclipse.persistence.eis.mappingsEISCompositeCollectionMapping

Javadoc

EIS Composite Collection Mappings map a java.util.Map or java.util.Collection of Java objects to an EIS record in a privately owned, one-to-many relationship according to its descriptor's record type.

Record Type Description
Indexed Ordered collection of record elements. The indexed record EIS format enables Java class attribute values to be retreived by position or index.
Mapped Key-value map based representation of record elements. The mapped record EIS format enables Java class attribute values to be retreived by an object key.
XML Record/Map representation of an XML DOM element.

Most used methods

  • getContainerPolicy
  • getReferenceClass
  • getDescriptor
  • getField
  • getObjectBuilder
  • getReferenceDescriptor
  • setField
  • <init>
  • getAttributeClassification
  • getAttributeName
  • getReferenceClassName
  • getReferenceClassName

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • BoxLayout (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now