FileDocCategorySizeDatePackage
MetadataValidator.javaAPI DocGlassfish v2 API16084Tue May 22 16:54:26 BST 2007oracle.toplink.essentials.internal.ejb.cmp3.metadata

MetadataValidator

public class MetadataValidator extends Object
Validator class for the metadata processors. It defines the common validation exceptions used by the metadata processors.
author
Guy Pelletier
since
TopLink EJB 3.0 Reference Implementation

Fields Summary
Constructors Summary
Methods Summary
public voidthrowBothFieldsAndPropertiesAnnotatedException(java.lang.Class javaClass)
INTERNAL: This exception should be used to report a case where both fields and properties of a class are annotated.

        throw ValidationException.bothFieldsAndPropertiesAnnotated(javaClass);
    
public voidthrowCircularMappedByReferences(java.lang.Class cls1, java.lang.String attributeName1, java.lang.Class cls2, java.lang.String attributeName2)
INTERNAL:

        throw ValidationException.circularMappedByReferences(cls1, attributeName1, cls2, attributeName2);
    
public voidthrowClassNotFoundWhileConvertingClassNames(java.lang.String className, java.lang.Exception exception)
INTERNAL:

        throw ValidationException.classNotFoundWhileConvertingClassNames(className, exception);
    
public voidthrowConflictingAccessTypeInEmbeddable(java.lang.Class embeddableClass)
INTERNAL: This exception should be used to report a case where an embeddable class is used by entity classes having conflicting access-type and embeddable's access-type is determined by enclosing entity's access-type. This is thrown to disallow different representation of the same embeddable class.

        throw ValidationException.conflictingAccessTypeForEmbeddable(embeddableClass);
    
public voidthrowConflictingSequenceAndTableGeneratorsSpecified(java.lang.String name, java.lang.String sequenceGeneratorLocation, java.lang.String tableGeneratorLocation)
INTERNAL:

        throw ValidationException.conflictingSequenceAndTableGeneratorsSpecified(name, sequenceGeneratorLocation, tableGeneratorLocation);
    
public voidthrowConflictingSequenceGeneratorsSpecified(java.lang.String name, java.lang.String location1, java.lang.String location2)
INTERNAL:

        throw ValidationException.conflictingSequenceGeneratorsSpecified(name, location1, location2);
    
public voidthrowConflictingSequenceNameAndTablePkColumnValueSpecified(java.lang.String name, java.lang.String sequenceGeneratorLocation, java.lang.String tableGeneratorLocation)
INTERNAL:

        throw ValidationException.conflictingSequenceNameAndTablePkColumnValueSpecified(name, sequenceGeneratorLocation, tableGeneratorLocation);
    
public voidthrowConflictingTableGeneratorsSpecified(java.lang.String name, java.lang.String location1, java.lang.String location2)
INTERNAL:

        throw ValidationException.conflictingTableGeneratorsSpecified(name, location1, location2);
    
public voidthrowCouldNotFindMapKey(java.lang.String fieldOrPropertyName, java.lang.Class referenceClass, oracle.toplink.essentials.mappings.DatabaseMapping mapping)
INTERNAL:

        throw ValidationException.couldNotFindMapKey(fieldOrPropertyName, referenceClass, mapping);
    
public voidthrowEmbeddedIdAndIdFound(java.lang.Class entityClass, java.lang.String attributeName, java.lang.String idAttributeName)
INTERNAL:

        throw ValidationException.embeddedIdAndIdAnnotationFound(entityClass, attributeName, idAttributeName);
    
public voidthrowEmbeddedIdHasNoAttributes(java.lang.Class entityClass, java.lang.Class embeddableClass, java.lang.String accessType)
INTERNAL: This exception should be used to report a case where an entity uses EmbeddedId, but there is no attribute specified in the embeddable class. This is most likely caused by incorrect access-type of the embeddable class.

        throw ValidationException.embeddedIdHasNoAttributes(entityClass, embeddableClass, accessType);
    
public voidthrowErrorProcessingNamedQueryAnnotation(java.lang.Class entityClass, java.lang.String name, java.lang.Exception exception)
INTERNAL:

        throw ValidationException.errorProcessingNamedQueryAnnotation(entityClass, name, exception);
    
public voidthrowExcessiveJoinColumnsSpecified(java.lang.Class entityClass, java.lang.Object element)
INTERNAL:

        throw ValidationException.excessiveJoinColumnsSpecified((AnnotatedElement) element, entityClass);
    
public voidthrowExcessivePrimaryKeyJoinColumnsSpecified(java.lang.Class entityClass, java.lang.reflect.AnnotatedElement element)
INTERNAL:

        throw ValidationException.excessivePrimaryKeyJoinColumnsSpecified(element);
    
public voidthrowIncompleteJoinColumnsSpecified(java.lang.Class entityClass, java.lang.Object element)
INTERNAL:

        throw ValidationException.incompleteJoinColumnsSpecified((AnnotatedElement) element, entityClass);
    
public voidthrowIncompletePrimaryKeyJoinColumnsSpecified(java.lang.Class entityClass, java.lang.reflect.AnnotatedElement annotatedElement)
INTERNAL:

        throw ValidationException.incompletePrimaryKeyJoinColumnsSpecified(annotatedElement);
    
public voidthrowIncorrectOverridingOfAccessType(java.lang.Class javaClass, java.lang.String xmlAccessType, java.lang.String annotAccessType)
INTERNAL: This exception should be used to report a case where access-type that is determined using XML is *different* from access-type determined using annotations in the class.

        throw ValidationException.incorrectOverridingOfAccessType(javaClass, xmlAccessType, annotAccessType);
    
public voidthrowInvalidCallbackMethod(java.lang.Class listenerClass, java.lang.String methodName)
INTERNAL:

        throw ValidationException.invalidCallbackMethod(listenerClass, methodName);
    
public voidthrowInvalidCollectionTypeForRelationship(java.lang.Class entityClass, java.lang.Class rawClass, java.lang.Object element)
INTERNAL

        throw ValidationException.invalidCollectionTypeForRelationship(entityClass, rawClass, element);
    
public voidthrowInvalidCompositePKAttribute(java.lang.Class entityClass, java.lang.String pkClassName, java.lang.String attributeName, java.lang.reflect.Type expectedType, java.lang.reflect.Type type)
INTERNAL:

        throw ValidationException.invalidCompositePKAttribute(entityClass, pkClassName, attributeName, expectedType, type);
    
public voidthrowInvalidCompositePKSpecification(java.lang.Class entityClass, java.lang.String idClassName)
INTERNAL:

        throw ValidationException.invalidCompositePKSpecification(entityClass, idClassName);    
    
public voidthrowInvalidEmbeddableAttribute(java.lang.Class entityClass, java.lang.String attributeName, java.lang.Class embeddedClass, java.lang.String embeddedAttributeName)
INTERNAL:

        throw ValidationException.invalidEmbeddableAttribute(embeddedClass, embeddedAttributeName, entityClass, attributeName);
    
public voidthrowInvalidEmbeddedAttribute(java.lang.Class javaClass, java.lang.String attributeName, java.lang.Class embeddableClass)
INTERNAL: This exception should be used to report a case where the type of an embedded field or property is not Embeddable.

        throw ValidationException.invalidEmbeddedAttribute(javaClass, attributeName, embeddableClass);
    
public voidthrowInvalidMappingEncountered(java.lang.Class entityClass, java.lang.Class targetClass)
INTERNAL:

    	throw ValidationException.invalidMapping(entityClass, targetClass);
    
public voidthrowInvalidOrderByValue(java.lang.Class entityClass, java.lang.String propertyOrFieldName, java.lang.Class referenceClass, java.lang.String attributeName)
INTERNAL:

        throw ValidationException.invalidOrderByValue(propertyOrFieldName, referenceClass, attributeName, entityClass);
    
public voidthrowInvalidTypeForEnumeratedAttribute(java.lang.Class entityClass, java.lang.String attributeName, java.lang.Class referenceClass)
INTERNAL:

        throw ValidationException.invalidTypeForEnumeratedAttribute(attributeName, referenceClass, entityClass);
    
public voidthrowInvalidTypeForLOBAttribute(java.lang.Class entityClass, java.lang.String attributeName, java.lang.Class referenceClass)
INTERNAL:

        throw ValidationException.invalidTypeForLOBAttribute(attributeName, referenceClass, entityClass);
    
public voidthrowInvalidTypeForSerializedAttribute(java.lang.Class entityClass, java.lang.String attributeName, java.lang.Class referenceClass)
INTERNAL:

        throw ValidationException.invalidTypeForSerializedAttribute(attributeName, referenceClass, entityClass);   
    
public voidthrowInvalidTypeForTemporalAttribute(java.lang.Class entityClass, java.lang.String attributeName, java.lang.Class referenceClass)
INTERNAL:

        throw ValidationException.invalidTypeForTemporalAttribute(attributeName, referenceClass, entityClass);
    
public voidthrowInvalidTypeForVersionAttribute(java.lang.Class entityClass, java.lang.String attributeName, java.lang.Class lockingType)
INTERNAL:

        throw ValidationException.invalidTypeForVersionAttribute(attributeName, lockingType, entityClass);
    
public voidthrowMappingAnnotationsAppliedToTransientAttribute(java.lang.reflect.AnnotatedElement annotatedElement)
INTERNAL:

        throw ValidationException.mappingAnnotationsAppliedToTransientAttribute(annotatedElement);
     
public voidthrowMappingFileNotFound(java.lang.String puName, java.lang.String mappingFile)
INTERNAL: This exception should be used when there is no mapping file found found in class path.

        throw ValidationException.mappingFileNotFound(puName, mappingFile);
    
public voidthrowMultipleEmbeddedIdsFound(java.lang.Class entityClass, java.lang.String attributeName, java.lang.String embeddedIdAttributeName)
INTERNAL:

        throw ValidationException.multipleEmbeddedIdAnnotationsFound(entityClass, attributeName, embeddedIdAttributeName);
    
public voidthrowNoCorrespondingSetterMethodDefined(java.lang.Class entityClass, java.lang.reflect.Method method)
INTERNAL:

        throw ValidationException.noCorrespondingSetterMethodDefined(entityClass, method);
    
public voidthrowNoMappedByAttributeFound(java.lang.Class owningClass, java.lang.String owningAttributeName, java.lang.Class entityClass, java.lang.String attributeName)
INTERNAL:

        throw ValidationException.noMappedByAttributeFound(owningClass, owningAttributeName, entityClass, attributeName);
    
public voidthrowNoPrimaryKeyAnnotationsFound(java.lang.Class entityClass)
INTERNAL:

        throw ValidationException.noPrimaryKeyAnnotationsFound(entityClass);   
    
public voidthrowNoTemporalTypeSpecified(java.lang.Class entityClass, java.lang.String attributeName)
INTERNAL:

        throw ValidationException.noTemporalTypeSpecified(attributeName, entityClass);
    
public voidthrowNonEntityTargetInRelationship(java.lang.Class javaClass, java.lang.Class targetEntity, java.lang.reflect.AnnotatedElement annotatedElement)
INTERNAL: This exception should be used to report use of non-entity class as target of a relationship.

        throw ValidationException.nonEntityTargetInRelationship(javaClass, targetEntity, annotatedElement);
    
public voidthrowNonUniqueEntityName(java.lang.String clsName1, java.lang.String clsName2, java.lang.String name)
INTERNAL:

        throw ValidationException.nonUniqueEntityName(clsName1, clsName2, name);
    
public voidthrowNonUniqueMappingFileName(java.lang.String puName, java.lang.String mf)
INTERNAL: This exception should be used when there are multiple mapping files with same name found in class path.

        throw ValidationException.nonUniqueMappingFileName(puName, mf);
    
public voidthrowOnlyOneGeneratedValueIsAllowed(java.lang.Class entityClass, java.lang.String existingField, java.lang.String otherField)
INTERNAL:

        throw ValidationException.onlyOneGeneratedValueIsAllowed(entityClass, existingField, otherField);
    
public voidthrowRelationshipHasColumnSpecified(java.lang.Class entityClass, java.lang.String attributeName)
INTERNAL:

        throw ValidationException.invalidColumnAnnotationOnRelationship(entityClass, attributeName);   
    
public voidthrowSequenceGeneratorUsingAReservedName(java.lang.String location, java.lang.String reservedName)
INTERNAL:

        throw ValidationException.sequenceGeneratorUsingAReservedName(reservedName, location);
    
public voidthrowTableGeneratorUsingAReservedName(java.lang.String location, java.lang.String reservedName)
INTERNAL:

        throw ValidationException.tableGeneratorUsingAReservedName(reservedName, location);
    
public voidthrowTablePerClassInheritanceNotSupported(java.lang.Class cls)
INTERNAL:

        throw ValidationException.tablePerClassInheritanceNotSupported(cls);
    
public voidthrowUnableToDetermineClassForField(java.lang.String attributeName, java.lang.Class entityClass)
INTERNAL:

        throw ValidationException.unableToDetermineClassForField(attributeName, entityClass);
    
public voidthrowUnableToDetermineClassForProperty(java.lang.String attributeName, java.lang.Class entityClass)
INTERNAL:

        throw ValidationException.unableToDetermineClassForProperty(attributeName, entityClass);
    
public voidthrowUnableToDetermineTargetEntity(java.lang.String attributeName, java.lang.Class entityClass)
INTERNAL:

        throw ValidationException.unableToDetermineTargetEntity(attributeName, entityClass);
    
public voidthrowUniDirectionalOneToManyHasJoinColumnSpecified(java.lang.String attributeName, java.lang.Class entityClass)
INTERNAL:

        throw ValidationException.uniDirectionalOneToManyHasJoinColumnAnnotations(attributeName, entityClass);