/** Override method in MappingElementImpl to set the _table variable * if necessary (used for unarchiving). * @param name the name * @exception ModelException if impossible */ public void setName (String name) throws ModelException { super.setName(name); if (getTable() == null) _table = name; }
public static void printMappingTableElements(int tabs, ArrayList tables) { final int count = ((tables != null) ? tables.size() : 0); if (count > 0) { println(tabs, "--> tables "); //NOI18N for (int i = 0; i < count; i++) { MappingTableElementImpl mte = (MappingTableElementImpl) tables.get(i); println(tabs, "[" + i + "] " + mte.getClass()); //NOI18N println(tabs+1, "table = " + mte.getTable()); //NOI18N println(tabs+1, "tableObject = " + mte.getTableObject()); //NOI18N println(tabs+1, "key = " + mte.getKey()); //NOI18N println(tabs+1, "keyObjects = " + mte.getKeyObjects()); //NOI18N printMappingRefKeyElements(tabs+1, mte.getReferencingKeys()); } println(tabs, "<-- tables "); //NOI18N } }
public static void printMappingTableElements(int tabs, ArrayList tables) { final int count = ((tables != null) ? tables.size() : 0); if (count > 0) { println(tabs, "--> tables "); //NOI18N for (int i = 0; i < count; i++) { MappingTableElementImpl mte = (MappingTableElementImpl) tables.get(i); println(tabs, "[" + i + "] " + mte.getClass()); //NOI18N println(tabs+1, "table = " + mte.getTable()); //NOI18N println(tabs+1, "tableObject = " + mte.getTableObject()); //NOI18N println(tabs+1, "key = " + mte.getKey()); //NOI18N println(tabs+1, "keyObjects = " + mte.getKeyObjects()); //NOI18N printMappingRefKeyElements(tabs+1, mte.getReferencingKeys()); } println(tabs, "<-- tables "); //NOI18N } }
/** Returns true if the table element used by this mapping table is equal * to the supplied table. * @return <code>true</code> if table elements are equal, * <code>false</code> otherwise. */ public boolean isEqual (TableElement table) { return ((table != null) ? getTable().equals(table.toString()) : false); }
/** Override method in MappingElementImpl to set the _table variable * if necessary (used for unarchiving). * @param name the name * @exception ModelException if impossible */ public void setName (String name) throws ModelException { super.setName(name); if (getTable() == null) _table = name; }
/** Returns true if the table element used by this mapping table is equal * to the supplied table. * @return <code>true</code> if table elements are equal, * <code>false</code> otherwise. */ public boolean isEqual (TableElement table) { return ((table != null) ? getTable().equals(table.toString()) : false); }
/** Set the table element for this mapping table to the supplied table. * @param table table element to be used by the mapping table. * @exception ModelException if impossible */ public void setTable (TableElement table) throws ModelException { String old = getTable(); String newName = table.toString(); try { fireVetoableChange(PROP_TABLE, old, newName); _table = newName; firePropertyChange(PROP_TABLE, old, newName); setName(_table); // sync up runtime's object too: force next // access to getTableObject to recompute it _tableObject = null; } catch (PropertyVetoException e) { throw new ModelVetoException(e); } }
/** Set the table element for this mapping table to the supplied table. * @param table table element to be used by the mapping table. * @exception ModelException if impossible */ public void setTable (TableElement table) throws ModelException { String old = getTable(); String newName = table.toString(); try { fireVetoableChange(PROP_TABLE, old, newName); _table = newName; firePropertyChange(PROP_TABLE, old, newName); setName(_table); // sync up runtime's object too: force next // access to getTableObject to recompute it _tableObject = null; } catch (PropertyVetoException e) { throw new ModelVetoException(e); } }