public static ValidationException cacheNotSupportedWithEmbeddable(Object embeddableClass) { Object[] args = { embeddableClass }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, CACHE_NOT_SUPPORTED_WITH_EMBEDDABLE, args)); validationException.setErrorCode(CACHE_NOT_SUPPORTED_WITH_EMBEDDABLE); return validationException; }
public static ValidationException cannotAcquireClientSessionFromSession() { Object[] args = { }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, CANNOT_ACQUIRE_CLIENTSESSION_FROM_SESSION, args)); validationException.setErrorCode(CANNOT_ACQUIRE_CLIENTSESSION_FROM_SESSION); return validationException; }
public static ValidationException cannotSetListenerClasses(Exception exception) { Object[] args = { }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, SET_LISTENER_CLASSES_EXCEPTION, args), exception); validationException.setErrorCode(SET_LISTENER_CLASSES_EXCEPTION); return validationException; }
public static ValidationException cannotRemoveFromReadOnlyClassesInNestedUnitOfWork() { Object[] args = { CR }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, CANNOT_REMOVE_FROM_READ_ONLY_CLASSES_IN_NESTED_UNIT_OF_WORK, args)); validationException.setErrorCode(CANNOT_REMOVE_FROM_READ_ONLY_CLASSES_IN_NESTED_UNIT_OF_WORK); return validationException; }
public static ValidationException descriptorMustBeNotInitialized(ClassDescriptor descriptor) { Object[] args = { descriptor, CR }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, DESCRIPTOR_MUST_NOT_BE_INITIALIZED, args)); validationException.setErrorCode(DESCRIPTOR_MUST_NOT_BE_INITIALIZED); return validationException; }
public static ValidationException fatalErrorOccurred(Exception exception) { Object[] args = { }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, FATAL_ERROR_OCCURRED, args), exception); validationException.setErrorCode(FATAL_ERROR_OCCURRED); return validationException; }
public static ValidationException invalidDerivedIdPrimaryKeyField(String referenceClassName, String primaryKeyFieldName, String attributeName, String cls) { Object[] args = { referenceClassName, primaryKeyFieldName, attributeName, cls }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, INVALID_DERIVED_ID_PRIMARY_KEY_FIELD, args)); validationException.setErrorCode(INVALID_DERIVED_ID_PRIMARY_KEY_FIELD); return validationException; }
public static ValidationException unsupportedCascadeLockingDescriptor(ClassDescriptor descriptor) { Object[] args = { descriptor }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, UNSUPPORTED_CASCADE_LOCKING_DESCRIPTOR, args)); validationException.setErrorCode(UNSUPPORTED_CASCADE_LOCKING_DESCRIPTOR); return validationException; }
public static ValidationException unfetchedAttributeNotEditable(String attributeName) { Object[] args = { attributeName }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, UNFETCHED_ATTRIBUTE_NOT_EDITABLE, args)); validationException.setErrorCode(UNFETCHED_ATTRIBUTE_NOT_EDITABLE); return validationException; }
public static ValidationException conflictingSequenceAndTableGeneratorsSpecified(String name, Object sequenceGeneratorLocation, Object tableGeneratorLocation) { Object[] args = { name, sequenceGeneratorLocation, tableGeneratorLocation }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, CONFLICTING_SEQUENCE_AND_TABLE_GENERATORS_SPECIFIED, args)); validationException.setErrorCode(CONFLICTING_SEQUENCE_AND_TABLE_GENERATORS_SPECIFIED); return validationException; }
public static ValidationException invalidMappingForMapKeyConvert(String className, String attributeName) { Object[] args = { className, attributeName }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, INVALID_MAPPING_FOR_MAP_KEY_CONVERT, args)); validationException.setErrorCode(INVALID_MAPPING_FOR_MAP_KEY_CONVERT); return validationException; }
public static ValidationException multipleEmbeddedIdAnnotationsFound(Object entityClass, String attributeName1, String attributeName2) { Object[] args = { entityClass, attributeName1, attributeName2 }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, MULTIPLE_EMBEDDED_ID_ANNOTATIONS_FOUND, args)); validationException.setErrorCode(MULTIPLE_EMBEDDED_ID_ANNOTATIONS_FOUND); return validationException; }
public static ValidationException classExtractorCanNotBeSpecifiedWithDiscriminatorMetadata(String className) { Object[] args = { className }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, CLASS_EXTRACTOR_CAN_NOT_BE_SPECIFIED_WITH_DISCRIMINATOR, args)); validationException.setErrorCode(CLASS_EXTRACTOR_CAN_NOT_BE_SPECIFIED_WITH_DISCRIMINATOR); return validationException; }
public static ValidationException invalidCacheStatementsSize(String cacheStatementsSize,String errorMessage) { Object[] args = { cacheStatementsSize,errorMessage}; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, INVALID_CACHESTATEMENTS_SIZE_VALUE, args)); validationException.setErrorCode(INVALID_CACHESTATEMENTS_SIZE_VALUE); return validationException; }
public static ValidationException invalidBooleanValueForSettingNativeSQL(String specifiedBooleanValue) { Object[] args = { specifiedBooleanValue }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, INVALID_BOOLEAN_VALUE_FOR_SETTING_NATIVESQL, args)); validationException.setErrorCode(INVALID_BOOLEAN_VALUE_FOR_SETTING_NATIVESQL); return validationException; }
public static ValidationException invalidLoggingFile() { Object[] args = { }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, LOGGING_FILE_NAME_CANNOT_BE_EMPTY,args)); validationException.setErrorCode(LOGGING_FILE_NAME_CANNOT_BE_EMPTY); return validationException; }
public static ValidationException invalidMappingForStructConverter(String name, DatabaseMapping mapping) { Object[] args = {name, mapping}; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, INVALID_MAPPING_FOR_STRUCT_CONVERTER, args)); validationException.setErrorCode(INVALID_MAPPING_FOR_STRUCT_CONVERTER); return validationException; }
/** * PUBLIC: * Cause: ReadTransformer for the specified attribute of the specified class * specifies neither class nor method. */ public static ValidationException readTransformerHasNeitherClassNorMethod(String annotatedElement) { Object[] args = { annotatedElement }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, READ_TRANSFORMER_HAS_NEITHER_CLASS_NOR_METHOD, args)); validationException.setErrorCode(READ_TRANSFORMER_HAS_NEITHER_CLASS_NOR_METHOD); return validationException; }
/** * PUBLIC: * Cause: WriteTransformer for the specified attribute of the specified class * has no column specified, of the specified column doesn't have name. */ public static ValidationException writeTransformerHasNoColumnName(String annotatedElement) { Object[] args = { annotatedElement }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, WRITE_TRANSFORMER_HAS_NO_COLUMN_NAME, args)); validationException.setErrorCode(WRITE_TRANSFORMER_HAS_NO_COLUMN_NAME); return validationException; }
/** * PUBLIC: * Cause: An annotation or XML document specifies a CloneCopyPolicy, bug does not supply either a method or * working copy method */ public static ValidationException multipleCopyPolicyAnnotationsOnSameClass(String className) { Object[] args = { className }; ValidationException validationException = new ValidationException(ExceptionMessageGenerator.buildMessage(ValidationException.class, MULTIPLE_COPY_POLICY_ANNOTATIONS_ON_SAME_CLASS, args)); validationException.setErrorCode(MULTIPLE_COPY_POLICY_ANNOTATIONS_ON_SAME_CLASS); return validationException; }