Search in sources :

Example 26 with Table

use of org.datanucleus.store.rdbms.table.Table in project datanucleus-rdbms by datanucleus.

the class TimesTenAdapter method isSelfReferencingForeignKey.

/**
 * Returns true if foreign key is self-referencing
 * @param fk foreign key
 * @return true if foreign key is self-referencing
 */
private static boolean isSelfReferencingForeignKey(ForeignKey fk) {
    if (fk != null) {
        String sql = fk.toString();
        Table obj = fk.getTable();
        if (obj != null) {
            String container = obj.toString();
            return isSelfReferencingForeignKey(sql, container);
        }
    }
    return false;
}
Also used : Table(org.datanucleus.store.rdbms.table.Table)

Aggregations

Table (org.datanucleus.store.rdbms.table.Table)26 JavaTypeMapping (org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping)20 AbstractMemberMetaData (org.datanucleus.metadata.AbstractMemberMetaData)17 DatastoreClass (org.datanucleus.store.rdbms.table.DatastoreClass)15 SQLTable (org.datanucleus.store.rdbms.sql.SQLTable)12 SQLExpression (org.datanucleus.store.rdbms.sql.expression.SQLExpression)12 AbstractClassMetaData (org.datanucleus.metadata.AbstractClassMetaData)11 NucleusException (org.datanucleus.exceptions.NucleusException)10 RDBMSStoreManager (org.datanucleus.store.rdbms.RDBMSStoreManager)10 JoinTable (org.datanucleus.store.rdbms.table.JoinTable)10 SelectStatement (org.datanucleus.store.rdbms.sql.SelectStatement)9 SQLExpressionFactory (org.datanucleus.store.rdbms.sql.expression.SQLExpressionFactory)9 ClassLoaderResolver (org.datanucleus.ClassLoaderResolver)8 MapTable (org.datanucleus.store.rdbms.table.MapTable)8 CollectionTable (org.datanucleus.store.rdbms.table.CollectionTable)7 ClassTable (org.datanucleus.store.rdbms.table.ClassTable)6 ArrayTable (org.datanucleus.store.rdbms.table.ArrayTable)4 ElementContainerTable (org.datanucleus.store.rdbms.table.ElementContainerTable)4 PersistableJoinTable (org.datanucleus.store.rdbms.table.PersistableJoinTable)4 Collection (java.util.Collection)3