/** * The name of the schema definition table. Defaults to * <code>OPENJPA_SCHEMA</code>. */ public void setTable(String name) { _table = DBIdentifier.newTable(name); }
/** * Constructor. * * @param name the table name * @param schema the table schema * @deprecated */ public Table(String name, Schema schema) { this(DBIdentifier.newTable(name), schema); }
/** * Name of sequence table, if any. * @deprecated */ public void setTable(String table) { setTableIdentifier(DBIdentifier.newTable(table)); }
/** * Set the name of the table. This method can only be called on tables * that are not part of a schema. * @deprecated use {@link #setIdentifier(DBIdentifier)} instead. */ @Deprecated public void setName(String name) { setIdentifier(DBIdentifier.newTable(name)); }
/** * @deprecated */ public Table findTable(String name) { if (name == null) return null; return findTable(DBIdentifier.newTable(name)); }
/** * Return any columns defined for the given class level join, or empty * list if none. * @deprecated */ public List<Column> getSecondaryTableJoinColumns(String tableName) { return getSecondaryTableJoinColumns(DBIdentifier.newTable(tableName)); }
/** * Return the named table for the given class. * @deprecated */ public Table getTable(final ClassMapping cls, String tableName, boolean adapt) { return getTable(cls, DBIdentifier.newTable(tableName), adapt); }
/** * Add a unique constraint for the given table. * @param table must be primary table or secondary table name added a * priori to this receiver. * @param unique the unique constraint. null means no-op. * @deprecated */ public void addUnique(String table, Unique unique) { addUnique(DBIdentifier.newTable(table), unique); }
/** * Create an index if necessary for some database tables */ public void createIndexIfNecessary(Schema schema, String table, Column pkColumn) { createIndexIfNecessary(schema, DBIdentifier.newTable(table), pkColumn); }
/** * The column's table name. You can only call this method on columns * whose table object is not set. * @deprecated */ public void setTableName(String name) { setTableIdentifier(DBIdentifier.newTable(name)); }
/** * Adds a Secondary table of given name to this mapping. A secondary table * must be known before unique constraints are added to a Secondary table. * @deprecated */ public void addSecondaryTable(String second) { setSecondaryTableJoinColumns(DBIdentifier.newTable(second), null); }
/** * Declare the given class-level join to the named (secondary) table. * @deprecated */ public void setSecondaryTableJoinColumns(String tableName, List<Column> cols) { if (cols == null) cols = Collections.emptyList(); setSecondaryTableJoinColumns(DBIdentifier.newTable(tableName), cols); }
/** * Generates table primary keys. * @deprecated */ public void generatePrimaryKeys(String schemaName, String tableName, Connection conn, DatabaseMetaData meta) throws SQLException { generatePrimaryKeys(DBIdentifier.newSchema(schemaName), DBIdentifier.newTable(tableName), conn, meta); }
/** * Return version column name * @param column * @param tableAlias : this is needed for platform specific version column */ public String getVersionColumn(Column column, String tableAlias) { return getVersionColumn(column, DBIdentifier.newTable(tableAlias)).toString(); }
/** * We allow fields to reference class-level joins using just the table * name, whereas the class join might have schema, etc information. * This method returns the name of the given table as listed in a * class-level join, or the given name if no join exists. * @deprecated */ public String getSecondaryTableName(String tableName) { return getSecondaryTableIdentifier(DBIdentifier.newTable(tableName)).getName(); }
/** * Start tracking secondary table information and columns */ private boolean startSecondaryTable(Attributes attrs) throws SAXException { _secondaryTable = toTableIdentifier(attrs.getValue("schema"), attrs.getValue("name")).getName(); ((ClassMapping)currentElement()).getMappingInfo() .addSecondaryTable(DBIdentifier.newTable(_secondaryTable)); return true; }
/** * Reflect on the schema to find tables matching the given name pattern. * @deprecated */ public Table[] getTables(DatabaseMetaData meta, String catalog, String schemaName, String tableName, Connection conn) throws SQLException { return getTables(meta, DBIdentifier.newCatalog(catalog), DBIdentifier.newSchema(schemaName), DBIdentifier.newTable(tableName), conn); }
/** * Reflect on the schema to return full foreign keys imported by the given * table pattern. * @deprecated */ public ForeignKey[] getImportedKeys(DatabaseMetaData meta, String catalog, String schemaName, String tableName, Connection conn, boolean partialKeys) throws SQLException { return getImportedKeys(meta, DBIdentifier.newCatalog(catalog), DBIdentifier.newSchema(schemaName), DBIdentifier.newTable(tableName), conn, partialKeys); }
@Override public Column[] getColumns(DatabaseMetaData meta, String catalog, String schemaName, String tableName, String columnName, Connection conn) throws SQLException { return getColumns(meta, DBIdentifier.newCatalog(catalog), DBIdentifier.newSchema(schemaName), DBIdentifier.newTable(tableName), DBIdentifier.newColumn(columnName), conn); }
public Column[] getColumns(DatabaseMetaData meta, String catalog, String schemaName, String tableName, String columnName, Connection conn) throws SQLException { return getColumns(meta, DBIdentifier.newCatalog(catalog), DBIdentifier.newSchema(schemaName), DBIdentifier.newTable(tableName), DBIdentifier.newColumn(columnName),conn); }