use of org.dbflute.exception.DfPropertySettingTableNotFoundException in project dbflute-core by dbflute.
the class DfAdditionalPrimaryKeyInitializer method assertTable.
protected void assertTable(final String primaryKeyName, final String tableName) {
if (getTable(tableName) != null) {
return;
}
final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
br.addNotice("Not found table by the tableName of additionalPrimaryKey.");
br.addItem("Additional PK");
br.addElement(primaryKeyName);
br.addItem("NotFound Table");
br.addElement(tableName);
final String msg = br.buildExceptionMessage();
throw new DfPropertySettingTableNotFoundException(msg);
}
use of org.dbflute.exception.DfPropertySettingTableNotFoundException in project dbflute-core by dbflute.
the class DfAdditionalForeignKeyInitializer method assertLocalTable.
protected void assertLocalTable(final String foreignKeyName, final String localTableName) {
if (getTable(localTableName) != null) {
return;
}
final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
br.addNotice("Not found table by the localTableName of additionalForeignKey.");
br.addItem("Advice");
br.addElement("Make sure your additionalForeignKeyMap.dfprop");
br.addElement("For example:");
br.addElement(" (x):");
br.addElement(" ; FK_MEMBER_MEMBER_ADDRESS_VALID = map:{");
br.addElement(" ; localTableName = NOEXISTING_STATUS ; foreignTableName = ... // *NG");
br.addElement(" ; localColumnName = MEMBER_ID ; foreignColumnName = MEMBER_ID");
br.addElement(" ...");
br.addElement(" }");
br.addElement(" (o):");
br.addElement(" ; FK_MEMBER_MEMBER_ADDRESS_VALID = map:{");
br.addElement(" ; localTableName = MEMBER_STATUS ; foreignTableName = ... // OK");
br.addElement(" ; localColumnName = MEMBER_ID ; foreignColumnName = MEMBER_ID");
br.addElement(" ...");
br.addElement(" }");
br.addElement("");
br.addElement("Or remove it if the table is deleted from your schema.");
br.addItem("Additional FK");
br.addElement(foreignKeyName);
br.addItem("NotFound Table");
br.addElement(localTableName);
final String msg = br.buildExceptionMessage();
throw new DfPropertySettingTableNotFoundException(msg);
}
use of org.dbflute.exception.DfPropertySettingTableNotFoundException in project dbflute-core by dbflute.
the class DfAdditionalUniqueKeyInitializer method assertTable.
protected void assertTable(final String primaryKeyName, final String tableName) {
if (getTable(tableName) != null) {
return;
}
final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
br.addNotice("Not found table by the tableName of additionalUniqueKey.");
br.addItem("Additional UQ");
br.addElement(primaryKeyName);
br.addItem("NotFound Table");
br.addElement(tableName);
final String msg = br.buildExceptionMessage();
throw new DfPropertySettingTableNotFoundException(msg);
}
use of org.dbflute.exception.DfPropertySettingTableNotFoundException in project dbflute-core by dbflute.
the class DfSequenceHandlerJdbc method findTableInfo.
protected DfTableMeta findTableInfo(Connection conn, String tableName) throws SQLException {
final DfTableMeta table = _tableMap.get(tableName);
if (table == null) {
String msg = "Failed to find the table in generated target tables:";
msg = msg + " table=" + tableName + " target=" + _tableMap.keySet();
throw new DfPropertySettingTableNotFoundException(msg);
}
return table;
}
use of org.dbflute.exception.DfPropertySettingTableNotFoundException in project dbflute-core by dbflute.
the class DfRepsSequenceHandlerJdbc method findTableInfo.
protected DfTableMeta findTableInfo(Connection conn, String tableName) throws SQLException {
final DfTableMeta table = _tableMap.get(tableName);
if (table == null) {
String msg = "Failed to find the table in generated target tables:";
msg = msg + " table=" + tableName + " target=" + _tableMap.keySet();
throw new DfPropertySettingTableNotFoundException(msg);
}
return table;
}
Aggregations