1 21 package oracle.toplink.essentials.internal.ejb.cmp3.xml; 23 24 import java.lang.reflect.AnnotatedElement ; 25 26 import oracle.toplink.essentials.exceptions.ValidationException; 27 import oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataValidator; 28 29 import org.w3c.dom.Document ; 30 31 38 public class XMLValidator extends MetadataValidator { 39 public XMLValidator() {} 40 41 44 public void throwEmbeddedIdAndIdFound(Class entityClass, String attributeName, String idAttributeName) { 45 throw ValidationException.embeddedIdAndIdElementFound(entityClass, attributeName, idAttributeName); 46 } 47 48 51 public void throwErrorProcessingNamedQueryElement(String queryName, Exception exception) { 52 throw ValidationException.errorProcessingNamedQueryElement(queryName, exception); 53 } 54 55 58 public void throwExcessiveJoinColumnsSpecified(Class entityClass, Object element) { 59 throw ValidationException.excessiveJoinColumnElementsSpecified((String ) element, entityClass); 60 } 61 62 65 public void throwExcessivePrimaryKeyJoinColumnsSpecified(Class entityClass, AnnotatedElement annotatedElement) { 66 throw ValidationException.excessivePrimaryKeyJoinColumnElementsSpecified(entityClass); 67 } 68 69 72 public void throwIncompleteJoinColumnsSpecified(Class entityClass, Object element) { 73 throw ValidationException.incompleteJoinColumnElementsSpecified(element, entityClass); 74 } 75 76 79 public void throwIncompletePrimaryKeyJoinColumnsSpecified(Class entityClass, AnnotatedElement annotatedElement) { 80 throw ValidationException.incompletePrimaryKeyJoinColumnElementsSpecified(entityClass); 81 } 82 83 86 public void throwMultipleEmbeddedIdsFound(Class entityClass, String attributeName, String embeddedIdAttributeName) { 87 throw ValidationException.multipleEmbeddedIdElementsFound(entityClass, attributeName, embeddedIdAttributeName); 88 } 89 90 93 public void throwNoMappedByAttributeFound(Class owningClass, String owningAttributeName, Class entityClass, String attributeName) { 94 } 96 97 100 public void throwNoTemporalTypeSpecified(Class entityClass, String attributeName) { 101 throw ValidationException.noTemporalTypeSpecified(attributeName, entityClass); 103 } 104 105 108 public void throwPersistenceUnitMetadataConflict(String element) { 109 throw ValidationException.persistenceUnitMetadataConflict(element); 110 } 111 112 115 public void throwRelationshipHasColumnSpecified(Class entityClass, String attributeName) { 116 throw ValidationException.invalidColumnElementOnRelationship(entityClass, attributeName); 117 } 118 119 122 public void throwSequenceGeneratorUsingAReservedName(String document, String reservedName) { 123 throw ValidationException.sequenceGeneratorUsingAReservedName(reservedName, document); 124 } 125 126 129 public void throwTableGeneratorUsingAReservedName(String document, String reservedName) { 130 throw ValidationException.tableGeneratorUsingAReservedName(reservedName, document); 131 } 132 133 136 public void throwUniDirectionalOneToManyHasJoinColumnSpecified(Class entityClass, String attributeName) { 137 throw ValidationException.uniDirectionalOneToManyHasJoinColumnElements(entityClass, attributeName); 138 } 139 } 140 | Popular Tags |