org.eclipse.persistence.exceptions.ValidationException.javaTypeIsNotAValidDatabaseType()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中org.eclipse.persistence.exceptions.ValidationException.javaTypeIsNotAValidDatabaseType()方法的一些代码示例,展示了ValidationException.javaTypeIsNotAValidDatabaseType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ValidationException.javaTypeIsNotAValidDatabaseType()方法的具体详情如下:
包路径:org.eclipse.persistence.exceptions.ValidationException
类名称:ValidationException
方法名:javaTypeIsNotAValidDatabaseType

ValidationException.javaTypeIsNotAValidDatabaseType介绍

暂无

代码示例

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

fieldType = platform.getFieldTypeDefinition(type);
if (fieldType == null) {
  throw ValidationException.javaTypeIsNotAValidDatabaseType(type);
  fieldType = platform.getFieldTypeDefinition(typeFromName);
  if (fieldType == null) {
    throw ValidationException.javaTypeIsNotAValidDatabaseType(typeFromName);
throw ValidationException.javaTypeIsNotAValidDatabaseType(null);

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

fieldType = platform.getFieldTypeDefinition(type);
if (fieldType == null) {
  throw ValidationException.javaTypeIsNotAValidDatabaseType(type);
  fieldType = platform.getFieldTypeDefinition(typeFromName);
  if (fieldType == null) {
    throw ValidationException.javaTypeIsNotAValidDatabaseType(typeFromName);
throw ValidationException.javaTypeIsNotAValidDatabaseType(null);

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Retrieve a database platform specific definition from session for
 * existing type instance or build a new one when type is {@code null}.
 * @param session Session to search for already existing instances.
 * @param type    Field type class.
 * @param name    Filed type name.
 * @return Database platform specific definition instance.
 * @throws ValidationException when provided type is not valid database type.
 */
protected static final FieldTypeDefinition getFieldTypeDefinition(
    final AbstractSession session, final Class type, final String name) {
  final FieldTypeDefinition fieldType = type != null
      ? session.getPlatform().getFieldTypeDefinition(type)
      : new FieldTypeDefinition(name);
  if (fieldType == null) {
    throw ValidationException.javaTypeIsNotAValidDatabaseType(type);
  }
  return fieldType;
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Retrieve a database platform specific definition from session for
 * existing type instance or build a new one when type is {@code null}.
 * @param session Session to search for already existing instances.
 * @param type    Field type class.
 * @param name    Filed type name.
 * @return Database platform specific definition instance.
 * @throws ValidationException when provided type is not valid database type.
 */
protected static final FieldTypeDefinition getFieldTypeDefinition(
    final AbstractSession session, final Class type, final String name) {
  final FieldTypeDefinition fieldType = type != null
      ? session.getPlatform().getFieldTypeDefinition(type)
      : new FieldTypeDefinition(name);
  if (fieldType == null) {
    throw ValidationException.javaTypeIsNotAValidDatabaseType(type);
  }
  return fieldType;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

fieldType = platform.getFieldTypeDefinition(argument.getType());
if (fieldType == null) {
  throw ValidationException.javaTypeIsNotAValidDatabaseType(argument.getType());

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Append the type.
 */
public void appendTypeString(Writer writer, AbstractSession session) throws ValidationException {
  try {
    FieldTypeDefinition fieldType;
    if (getType() != null) {
      fieldType = session.getPlatform().getFieldTypeDefinition(getType());
      if (fieldType == null) {
        throw ValidationException.javaTypeIsNotAValidDatabaseType(getType());
      }
    } else {
      fieldType = new FieldTypeDefinition(getTypeName());
    }
    writer.write(fieldType.getName());
    if ((fieldType.isSizeAllowed()) && ((getTypeSize() != 0) || (fieldType.isSizeRequired()))) {
      writer.write("(");
      if (getTypeSize() == 0) {
        writer.write(new Integer(fieldType.getDefaultSize()).toString());
      } else {
        writer.write(new Integer(getTypeSize()).toString());
      }
      writer.write(")");
    }
  } catch (IOException ioException) {
    throw ValidationException.fileError(ioException);
  }
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

fieldType = session.getPlatform().getFieldTypeDefinition(getType());
if (fieldType == null) {
  throw ValidationException.javaTypeIsNotAValidDatabaseType(getType());

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Append the type to the statement
 */
public void appendTypeString(Writer writer, AbstractSession session) throws ValidationException {
  FieldTypeDefinition fieldType;
  if (getType() != null) {
    fieldType = session.getPlatform().getFieldTypeDefinition(getType());
    if (fieldType == null) {
      throw ValidationException.javaTypeIsNotAValidDatabaseType(getType());
    }
  } else {
    fieldType = new FieldTypeDefinition(getTypeName());
  }
  try {
    writer.write(fieldType.getName());
    if ((fieldType.isSizeAllowed()) && ((getTypeSize() != 0) || (fieldType.isSizeRequired()))) {
      writer.write("(");
      if (getTypeSize() == 0) {
        writer.write(new Integer(fieldType.getDefaultSize()).toString());
      } else {
        writer.write(new Integer(getTypeSize()).toString());
      }
      writer.write(")");
    }
  } catch (IOException ioException) {
    throw ValidationException.fileError(ioException);
  }
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

fieldType = platform.getFieldTypeDefinition(argument.getType());
if (fieldType == null) {
  throw ValidationException.javaTypeIsNotAValidDatabaseType(argument.getType());

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

fieldType = platform.getFieldTypeDefinition(argument.getType());
if (fieldType == null) {
  throw ValidationException.javaTypeIsNotAValidDatabaseType(argument.getType());

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

fieldType = platform.getFieldTypeDefinition(getType());
if (fieldType == null) {
  throw ValidationException.javaTypeIsNotAValidDatabaseType(getType());
  fieldType = platform.getFieldTypeDefinition(type);
  if (fieldType == null) {
    throw ValidationException.javaTypeIsNotAValidDatabaseType(type);
throw ValidationException.javaTypeIsNotAValidDatabaseType(null);

相关文章

ValidationException类方法