当前位置: 首页>>代码示例>>Java>>正文


Java ValidationException类代码示例

本文整理汇总了Java中org.eclipse.persistence.exceptions.ValidationException的典型用法代码示例。如果您正苦于以下问题:Java ValidationException类的具体用法?Java ValidationException怎么用?Java ValidationException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ValidationException类属于org.eclipse.persistence.exceptions包,在下文中一共展示了ValidationException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildDBTable

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
/**
 * INTERNAL: Return the create table object.
 */
public void buildDBTable(AbstractSession session, DBMapping dbMapping) throws ValidationException {

    DBTable dBTable;
    Entity entity = (Entity) intrinsicEntity.get(0);
    Table table;
    if (attribute instanceof RelationAttribute) {
        dBTable = new DBRelationTable(getFullName(), entity, (RelationAttribute) attribute);//Todo pass managedClass
    } else if (attribute instanceof ElementCollection) {
        dBTable = new DBCollectionTable(getFullName(), entity, (ElementCollection) attribute);
    } else if((table = entity.getTable(getFullName())) instanceof SecondaryTable){
        dBTable = new DBSecondaryTable(getFullName(), entity, (SecondaryTable)table);
    } else {
        dBTable = new DBBaseTable(getFullName(), entity);
    }

    dBTable.setId(NBModelerUtil.getAutoGeneratedStringId());

    for (Iterator<FieldDefinition> itetrator = getFields().iterator(); itetrator.hasNext();) {
        JPAMFieldDefinition field = (JPAMFieldDefinition) itetrator.next();
        field.buildDBColumn(dBTable, session, this);
    }

    dbMapping.addTable(dBTable);
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:28,代码来源:JPAMTableDefinition.java

示例2: createVector

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
/**
 * INTERNAL:
 * given sequence = 10, size = 5 will create Vector (6,7,8,9,10)
 * @param seqName String is sequencing number field name
 * @param size int size of Vector to create.
 */
protected Vector createVector(Number sequence, String seqName, int size) {
    long nextSequence = sequence.longValue();

    Vector sequencesForName = new Vector(size);
    nextSequence = nextSequence - size;

    // Check for incorrect values return to validate that the sequence is setup correctly.
    // PRS 36451 intvalue would wrap
    if (nextSequence < -1L) {
        throw ValidationException.sequenceSetupIncorrectly(seqName);
    }

    for (int index = size; index > 0; index--) {
        nextSequence = nextSequence + 1L;
        sequencesForName.add(nextSequence);
    }
    return sequencesForName;
}
 
开发者ID:jmrunge,项目名称:osiris-platform,代码行数:25,代码来源:StandardSequence.java

示例3: process

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
public void process() {
    try{
    super.process();
    getMapping().setProperty(Attribute.class, manyToMany);
    getMapping().setProperty(Inheritance.class, inherit);//Remove inherit functionality , once eclipse support dynamic mapped super class
    } catch (ValidationException ex) {
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(manyToMany.getJavaClass());
        exception.setAttribute(manyToMany);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:14,代码来源:ManyToManySpecAccessor.java

示例4: addMultipleTableKeyFields

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
 protected void addMultipleTableKeyFields(List<PrimaryKeyJoinColumnMetadata> primaryKeyJoinColumns, DatabaseTable targetTable, String PK_CTX, String FK_CTX) {
    try {
        super.addMultipleTableKeyFields(primaryKeyJoinColumns, targetTable, PK_CTX, FK_CTX);
    } catch (ValidationException ex) {// to handle @PrimaryKeyJoinColumn exception
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(entity);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:11,代码来源:EntitySpecAccessor.java

示例5: process

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
public void process() {
    try {
        super.process();
    } catch (ValidationException ex) {
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(entity);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:11,代码来源:EntitySpecAccessor.java

示例6: processVirtualClass

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
protected void processVirtualClass() {
  try {
        super.processVirtualClass();
    } catch (ValidationException ex) {
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(entity);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:11,代码来源:EntitySpecAccessor.java

示例7: process

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
public void process() {
    try{
    super.process();
    getMapping().setProperty(Attribute.class, oneToOne);
    getMapping().setProperty(Inheritance.class, inherit);//Remove inherit functionality , once eclipse support dynamic mapped super class
    } catch (ValidationException ex) {
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(oneToOne.getJavaClass());
        exception.setAttribute(oneToOne);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:14,代码来源:OneToOneSpecAccessor.java

示例8: process

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
public void process() {
    try {
        super.process();
    } catch (ValidationException ex) {
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(defaultClass);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:11,代码来源:DefaultClassSpecAccessor.java

示例9: processVirtualClass

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
protected void processVirtualClass() {
  try {
        super.processVirtualClass();
    } catch (ValidationException ex) {
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(defaultClass);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:11,代码来源:DefaultClassSpecAccessor.java

示例10: process

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
public void process() {
    try {
    super.process();
    getMapping().setProperty(Attribute.class, manyToOne);
    getMapping().setProperty(Inheritance.class, inherit);//Remove inherit functionality , once eclipse support dynamic mapped super class
    } catch (ValidationException ex) {
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(manyToOne.getJavaClass());
        exception.setAttribute(manyToOne);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:14,代码来源:ManyToOneSpecAccessor.java

示例11: process

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
public void process() {
    try {
        super.process();
    } catch (ValidationException ex) {
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(embeddable);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:11,代码来源:EmbeddableSpecAccessor.java

示例12: processVirtualClass

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
protected void processVirtualClass() {
    try {
        super.processVirtualClass();
    } catch (ValidationException ex) {
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(embeddable);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:11,代码来源:EmbeddableSpecAccessor.java

示例13: process

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
public void process() {
    try{
    super.process();
    getMapping().setProperty(Attribute.class, oneToMany);
    getMapping().setProperty(Inheritance.class, inherit);//Remove inherit functionality , once eclipse support dynamic mapped super class
    } catch (ValidationException ex) {
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(oneToMany.getJavaClass());
        exception.setAttribute(oneToMany);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:14,代码来源:OneToManySpecAccessor.java

示例14: process

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
public void process() {
    try {
        super.process();
    } catch (ValidationException ex) {
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(mappedSuperclass);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:11,代码来源:MappedSuperclassSpecAccessor.java

示例15: processVirtualClass

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
protected void processVirtualClass() {
    try {
        super.processVirtualClass();
    } catch (ValidationException ex) {
        DBValidationException exception = new DBValidationException(ex);
        exception.setJavaClass(mappedSuperclass);
        throw exception;
    }
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:11,代码来源:MappedSuperclassSpecAccessor.java


注:本文中的org.eclipse.persistence.exceptions.ValidationException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。