descriptor = nodeValue.getMapping().getDescriptor();
/** * INTERNAL: * TopLink exceptions should only be thrown by TopLink. */ protected DescriptorException(String theMessage, DatabaseMapping mapping) { this(theMessage); if (mapping != null) { this.mapping = mapping; this.descriptor = mapping.getDescriptor(); } }
/** * INTERNAL: * TopLink exceptions should only be thrown by TopLink. */ protected DescriptorException(String theMessage, DatabaseMapping mapping) { this(theMessage); if (mapping != null) { this.mapping = mapping; this.descriptor = mapping.getDescriptor(); } }
/** * INTERNAL: * TopLink exceptions should only be thrown by TopLink. */ protected DescriptorException(String theMessage, DatabaseMapping mapping) { this(theMessage); if (mapping != null) { this.mapping = mapping; this.descriptor = mapping.getDescriptor(); } }
/** * INTERNAL: * Set the mapping. */ public void setMapping(DatabaseMapping mapping) { if (mapping != null) { this.mapping = mapping; setDescriptor(mapping.getDescriptor()); } }
/** * INTERNAL: * If a user does not specify the source key then the primary keys of the source table are used. */ protected void initializeSourceKeysWithDefaults(AbstractSession session, DatabaseMapping mapping) { List<DatabaseField> primaryKeyFields = mapping.getDescriptor().getPrimaryKeyFields(); for (int index = 0; index < primaryKeyFields.size(); index++) { getSourceKeyFields().addElement(primaryKeyFields.get(index)); } }
public NestedTable(QueryKeyExpression queryKeyExpression) { super(); this.queryKeyExpression = queryKeyExpression; setName((queryKeyExpression.getMapping().getDescriptor().getTables().firstElement()).getName()); tableQualifier = (queryKeyExpression.getMapping().getDescriptor().getTables().firstElement()).getQualifiedName(); }
public NestedTable(QueryKeyExpression queryKeyExpression) { super(); this.queryKeyExpression = queryKeyExpression; setName((queryKeyExpression.getMapping().getDescriptor().getTables().firstElement()).getName()); tableQualifier = (queryKeyExpression.getMapping().getDescriptor().getTables().firstElement()).getQualifiedName(); }
static EntityFieldInspector<? extends Annotation> getFieldInspector(final DatabaseMapping databaseMapping) { final String attributeName = databaseMapping.getAttributeName(); final Class<?> entityClass = databaseMapping.getDescriptor().getJavaClass(); Set<Field> fieldsWithName = ReflectionUtils.getAllFields(entityClass, ReflectionUtils.withName(attributeName)); final Field field = Iterables.get(fieldsWithName, 0); // final Field field = ReflectionUtils.findField(entityClass, // attributeName); return new ColumnFieldInspector(field); }
public static DescriptorException mustBeReadOnlyMappingWhenStoredInCache(DatabaseMapping mapping) { Object[] args = { mapping.getDescriptor().getJavaClass() }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, LOCK_MAPPING_MUST_BE_READONLY, args), mapping); descriptorException.setErrorCode(LOCK_MAPPING_MUST_BE_READONLY); return descriptorException; }
public static DescriptorException mappingCanNotBeReadOnly(DatabaseMapping mapping) { Object[] args = { mapping.getDescriptor().getJavaClass() }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, LOCK_MAPPING_CANNOT_BE_READONLY, args), mapping); descriptorException.setErrorCode(LOCK_MAPPING_CANNOT_BE_READONLY); return descriptorException; }
public static DescriptorException mappingCanNotBeReadOnly(DatabaseMapping mapping) { Object[] args = { mapping.getDescriptor().getJavaClass() }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, LOCK_MAPPING_CANNOT_BE_READONLY, args), mapping); descriptorException.setErrorCode(LOCK_MAPPING_CANNOT_BE_READONLY); return descriptorException; }
/** * INTERNAL: * Convert to the field class. */ public Object convertObjectValueToDataValue(Object attributeValue, Session session) { try { return ((AbstractSession)session).getDatasourcePlatform().convertObject(attributeValue, getDataClass()); } catch (ConversionException e) { throw ConversionException.couldNotBeConverted(mapping, mapping.getDescriptor(), e); } }
public static DescriptorException mustBeReadOnlyMappingWhenStoredInCache(DatabaseMapping mapping) { Object[] args = { mapping.getDescriptor().getJavaClass() }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, LOCK_MAPPING_MUST_BE_READONLY, args), mapping); descriptorException.setErrorCode(LOCK_MAPPING_MUST_BE_READONLY); return descriptorException; }
public static DescriptorException mappingCanNotBeReadOnly(DatabaseMapping mapping) { Object[] args = { mapping.getDescriptor().getJavaClass() }; DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, LOCK_MAPPING_CANNOT_BE_READONLY, args), mapping); descriptorException.setErrorCode(LOCK_MAPPING_CANNOT_BE_READONLY); return descriptorException; }
/** * INTERNAL: * Convert to the field class. */ public Object convertObjectValueToDataValue(Object attributeValue, Session session) { try { return ((AbstractSession)session).getDatasourcePlatform().convertObject(attributeValue, getDataClass()); } catch (ConversionException e) { throw ConversionException.couldNotBeConverted(mapping, mapping.getDescriptor(), e); } }
/** * INTERNAL: * Convert to the field class. */ public Object convertObjectValueToDataValue(Object attributeValue, Session session) { try { return ((AbstractSession)session).getDatasourcePlatform().convertObject(attributeValue, getDataClass()); } catch (ConversionException e) { throw ConversionException.couldNotBeConverted(mapping, mapping.getDescriptor(), e); } }
/** * INTERNAL: * Allow for initialization of properties and validation. */ public void preInitialize(AbstractSession session) throws DescriptorException { try { getAttributeAccessor().initializeAttributes(getDescriptor().getJavaClass()); } catch (DescriptorException exception) { exception.setMapping(this); session.getIntegrityChecker().handleError(exception); } }
/** * INTERNAL: * Allow for initialization of properties and validation. */ public void preInitialize(AbstractSession session) throws DescriptorException { try { getAttributeAccessor().initializeAttributes(getDescriptor().getJavaClass()); } catch (DescriptorException exception) { exception.setMapping(this); session.getIntegrityChecker().handleError(exception); } }
/** * INTERNAL: * Allow for initialization of properties and validation. */ public void preInitialize(AbstractSession session) throws DescriptorException { try { getAttributeAccessor().initializeAttributes(getDescriptor().getJavaClass()); } catch (DescriptorException exception) { exception.setMapping(this); session.getIntegrityChecker().handleError(exception); } }