• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ValidationException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: connectToDataSource

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
/**
 * Connect with the specified properties and return the Connection.
 */
public Connection connectToDataSource(EISAccessor accessor, Properties properties) throws DatabaseException, ValidationException {
	if (this.connectionFactory == null && this.name == null) {
		this.connectionFactory = new DemoConnectionFactory();
	}
	if (!properties.isEmpty()) {
		if (this.connectionSpec == null) {
			this.connectionSpec = new DemoJCAConnectionSpec();
		}
	}
	return super.connectToDataSource(accessor, properties);
}
 
开发者ID:rhulha,项目名称:EclipseLinkNoSQLDemoPlugin,代码行数:15,代码来源:DemoConnectionSpec.java


示例17: createUniqueConstraintsOnDatabase

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
void createUniqueConstraintsOnDatabase(final AbstractSession session) throws ValidationException, DatabaseException {
    if ((!session.getPlatform().supportsUniqueKeyConstraints())
            || getUniqueKeys().isEmpty()
            || session.getPlatform().requiresUniqueConstraintCreationOnTableCreate()) {
        return;
    }

    for (UniqueKeyConstraint uniqueKey : getUniqueKeys()) {
        session.priviledgedExecuteNonSelectingCall(new org.eclipse.persistence.queries.SQLCall(buildUniqueConstraintCreationWriter(session, uniqueKey, new StringWriter()).toString()));
    }
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:13,代码来源:JPAMTableDefinition.java


示例18: createForeignConstraintsOnDatabase

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
@Override
void createForeignConstraintsOnDatabase(final AbstractSession session) throws ValidationException, DatabaseException {
    if ((!session.getPlatform().supportsForeignKeyConstraints()) || getForeignKeyMap().isEmpty()) {
        return;
    }

    for (ForeignKeyConstraint foreignKey : getForeignKeyMap().values()) {
        if (!foreignKey.disableForeignKey()) {
            session.priviledgedExecuteNonSelectingCall(new SQLCall(buildConstraintCreationWriter(session, foreignKey, new StringWriter()).toString()));
        }
    }
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:13,代码来源:JPAMTableDefinition.java


示例19: appendToDDLWriter

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
public void appendToDDLWriter(Writer schemaWriter, String stringToWrite) {
    if (schemaWriter == null) {
        return; //do nothing.  Ignore append request
    }

    try {
        schemaWriter.write(stringToWrite);
        schemaWriter.flush();
    } catch (java.io.IOException ioException) {
        throw ValidationException.fileError(ioException);
    }
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:13,代码来源:JPAMSchemaManager.java


示例20: closeDDLWriter

import org.eclipse.persistence.exceptions.ValidationException; //导入依赖的package包/类
public void closeDDLWriter(Writer schemaWriter) {
    if (schemaWriter == null) {
        return;
    }

    try {
        schemaWriter.flush();
        schemaWriter.close();
    } catch (java.io.IOException ioException) {
        throw ValidationException.fileError(ioException);
    }
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:13,代码来源:JPAMSchemaManager.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LocationIndexedLine类代码示例发布时间:2022-05-23
下一篇:
Java AssetBitmapTexture类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap