/** INTERNAL: Initialize the mapping. */
  @Override
  public void initialize(AbstractSession session) throws DescriptorException {
    super.initialize(session);
    if ((getStructureName() == null) || getStructureName().length() == 0) {
      throw DescriptorException.structureNameNotSetInMapping(this);
    }

    // For bug 2730536 convert the field to be an ObjectRelationalDatabaseField.
    ObjectRelationalDatabaseField field = (ObjectRelationalDatabaseField) getField();
    field.setSqlType(java.sql.Types.ARRAY);
    field.setSqlTypeName(getStructureName());

    // May require native connection in WLS to avoid wrapping wrapped.
    getDescriptor().setIsNativeConnectionRequired(true);
  }
 protected void initializeReferenceDescriptorAndField(AbstractSession session) {
   if (this.referenceClass != null) {
     super.initialize(session);
   } else {
     // below should be the same as AbstractCompositeCollectionMapping.initialize
     if (this.field == null) {
       throw DescriptorException.fieldNameNotSetInMapping(this);
     }
     setField(getDescriptor().buildField(this.field));
     setFields(collectFields());
     if (hasConverter()) {
       getConverter().initialize(this, session);
     }
   }
 }
 public void setAttributeValueInObject(Object object, Object value) throws DescriptorException {
   if (isWriteOnly()) {
     return;
   }
   super.setAttributeValueInObject(object, value);
 }
 public void preInitialize(AbstractSession session) throws DescriptorException {
   getAttributeAccessor().setIsWriteOnly(this.isWriteOnly());
   getAttributeAccessor().setIsReadOnly(this.isReadOnly());
   super.preInitialize(session);
 }
 public void convertClassNamesToClasses(ClassLoader classLoader) {
   if (XMLConstants.UNKNOWN_OR_TRANSIENT_CLASS.equals(referenceClassName)) {
     return;
   }
   super.convertClassNamesToClasses(classLoader);
 }
 /**
  * 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());
   }
 }