/** * Creates a new dyna bean for the given table. * * @param table The table to create the bean for * @return The new dyna bean */ public DynaBean createDynaBeanFor(Table table) throws SqlDynaException { return getDynaClassCache().createNewInstance(table); }
/** * Returns the {@link org.apache.ddlutils.dynabean.SqlDynaClass} for the given dyna bean. * * @param bean The dyna bean * @return The <code>SqlDynaClass</code> for the given bean */ public SqlDynaClass getDynaClassFor(DynaBean bean) { return getDynaClassCache().getDynaClass(bean); }
/** * Convenience method that combines {@link #createDynaBeanFor(Table)} and * {@link #findTable(String, boolean)}. * * @param tableName The name of the table to create the bean for * @param caseSensitive Whether case matters for the names * @return The new dyna bean */ public DynaBean createDynaBeanFor(String tableName, boolean caseSensitive) throws SqlDynaException { return getDynaClassCache().createNewInstance(findTable(tableName, caseSensitive)); }
/** * Returns the {@link org.apache.ddlutils.dynabean.SqlDynaClass} for the given table name. If the it does not * exist yet, a new one will be created based on the Table definition. * * @param tableName The name of the table to create the bean for * @return The <code>SqlDynaClass</code> for the indicated table or <code>null</code> * if the model contains no such table */ public SqlDynaClass getDynaClassFor(String tableName) { Table table = findTable(tableName); return table != null ? getDynaClassCache().getDynaClass(table) : null; }