/** * PUBLIC: * Add the field to the type, default sizes are used. * @param type is the Java class type coresponding to the database type. */ public void addField(String fieldName, Class type) { this.addField(new FieldDefinition(fieldName, type)); }
/** * PUBLIC: * Add the field to the type. */ public void addField(FieldDefinition field) { this.getFields().addElement(field); }
/** * INTERNAL: * Return the drop type statement. */ public Writer buildDeletionWriter(AbstractSession session, Writer writer) throws ValidationException { try { writer.write("DROP TYPE " + getFullName()); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: * Return the create type statement. */ public Writer buildCreationWriter(AbstractSession session, Writer writer) throws ValidationException { try { writer.write("CREATE TYPE " + getFullName() + " AS OBJECT ("); for (Enumeration fieldsEnum = getFields().elements(); fieldsEnum.hasMoreElements();) { FieldDefinition field = (FieldDefinition)fieldsEnum.nextElement(); field.appendTypeString(writer, session); if (fieldsEnum.hasMoreElements()) { writer.write(", "); } } writer.write(")"); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: * Return the create type statement. */ public Writer buildCreationWriter(AbstractSession session, Writer writer) throws ValidationException { try { writer.write("CREATE TYPE " + getFullName() + " AS OBJECT ("); for (Enumeration fieldsEnum = getFields().elements(); fieldsEnum.hasMoreElements();) { FieldDefinition field = (FieldDefinition)fieldsEnum.nextElement(); field.appendTypeString(writer, session); if (fieldsEnum.hasMoreElements()) { writer.write(", "); } } writer.write(")"); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * PUBLIC: * Add the field to the type, default sizes are used. * @param type is the Java class type coresponding to the database type. */ public void addField(String fieldName, Class type) { this.addField(new FieldDefinition(fieldName, type)); }
/** * INTERNAL: * Return the create type statement. */ public Writer buildCreationWriter(AbstractSession session, Writer writer) throws ValidationException { try { writer.write("CREATE TYPE " + getFullName() + " AS OBJECT ("); for (Enumeration fieldsEnum = getFields().elements(); fieldsEnum.hasMoreElements();) { FieldDefinition field = (FieldDefinition)fieldsEnum.nextElement(); field.appendTypeString(writer, session); if (fieldsEnum.hasMoreElements()) { writer.write(", "); } } writer.write(")"); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * INTERNAL: * Return the drop type statement. */ public Writer buildDeletionWriter(AbstractSession session, Writer writer) throws ValidationException { try { writer.write("DROP TYPE " + getFullName()); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * PUBLIC: * Add the field to the type. */ public void addField(FieldDefinition field) { this.getFields().addElement(field); }
/** * PUBLIC: * Add the field to the type to a nested type. * @param typeName is the name of the nested type. */ public void addField(String fieldName, String typeName) { this.addField(new FieldDefinition(fieldName, typeName)); }
/** * INTERNAL: * Return the drop type statement. */ public Writer buildDeletionWriter(AbstractSession session, Writer writer) throws ValidationException { try { writer.write("DROP TYPE " + getFullName()); } catch (IOException ioException) { throw ValidationException.fileError(ioException); } return writer; }
/** * PUBLIC: * Add the field to the type. */ public void addField(FieldDefinition field) { this.getFields().addElement(field); }
/** * PUBLIC: * Add the field to the type. * @param type is the Java class type coresponding to the database type. */ public void addField(String fieldName, Class type, int fieldSize) { this.addField(new FieldDefinition(fieldName, type, fieldSize)); }
/** * PUBLIC: * Add the field to the type. * @param type is the Java class type coresponding to the database type. */ public void addField(String fieldName, Class type, int fieldSize, int fieldSubSize) { this.addField(new FieldDefinition(fieldName, type, fieldSize, fieldSubSize)); }
/** * PUBLIC: * Add the field to the type. * @param type is the Java class type coresponding to the database type. */ public void addField(String fieldName, Class type, int fieldSize) { this.addField(new FieldDefinition(fieldName, type, fieldSize)); }
/** * PUBLIC: * Add the field to the type. * @param type is the Java class type coresponding to the database type. */ public void addField(String fieldName, Class type, int fieldSize, int fieldSubSize) { this.addField(new FieldDefinition(fieldName, type, fieldSize, fieldSubSize)); }
/** * PUBLIC: * Add the field to the type to a nested type. * @param typeName is the name of the nested type. */ public void addField(String fieldName, String typeName) { this.addField(new FieldDefinition(fieldName, typeName)); }
/** * PUBLIC: * Add the field to the type. * @param type is the Java class type coresponding to the database type. */ public void addField(String fieldName, Class type, int fieldSize, int fieldSubSize) { this.addField(new FieldDefinition(fieldName, type, fieldSize, fieldSubSize)); }
/** * PUBLIC: * Add the field to the type. * @param type is the Java class type coresponding to the database type. */ public void addField(String fieldName, Class type, int fieldSize) { this.addField(new FieldDefinition(fieldName, type, fieldSize)); }
/** * PUBLIC: * Add the field to the type, default sizes are used. * @param type is the Java class type coresponding to the database type. */ public void addField(String fieldName, Class type) { this.addField(new FieldDefinition(fieldName, type)); }