target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testTransactionWithinTransaction() throws Exception { if (connectionSource == null) { return; } final TransactionManager mgr = new TransactionManager(connectionSource); final Dao<Foo, Integer> dao = createDao(Foo.class, true); mgr.callInTransaction(new Callable<Void>() { @Override public Void call() t...
public <T> T callInTransaction(final Callable<T> callable) throws SQLException { return callInTransaction(connectionSource, callable); }
TransactionManager { public <T> T callInTransaction(final Callable<T> callable) throws SQLException { return callInTransaction(connectionSource, callable); } }
TransactionManager { public <T> T callInTransaction(final Callable<T> callable) throws SQLException { return callInTransaction(connectionSource, callable); } TransactionManager(); TransactionManager(ConnectionSource connectionSource); }
TransactionManager { public <T> T callInTransaction(final Callable<T> callable) throws SQLException { return callInTransaction(connectionSource, callable); } TransactionManager(); TransactionManager(ConnectionSource connectionSource); void initialize(); T callInTransaction(final Callable<T> callable); T callInTransact...
TransactionManager { public <T> T callInTransaction(final Callable<T> callable) throws SQLException { return callInTransaction(connectionSource, callable); } TransactionManager(); TransactionManager(ConnectionSource connectionSource); void initialize(); T callInTransaction(final Callable<T> callable); T callInTransact...
@Test public void testTransactionWithinTransactionFails() throws Exception { if (connectionSource == null) { return; } final TransactionManager mgr = new TransactionManager(connectionSource); final Dao<Foo, Integer> dao = createDao(Foo.class, true); try { mgr.callInTransaction(new Callable<Void>() { @Override public Vo...
public <T> T callInTransaction(final Callable<T> callable) throws SQLException { return callInTransaction(connectionSource, callable); }
TransactionManager { public <T> T callInTransaction(final Callable<T> callable) throws SQLException { return callInTransaction(connectionSource, callable); } }
TransactionManager { public <T> T callInTransaction(final Callable<T> callable) throws SQLException { return callInTransaction(connectionSource, callable); } TransactionManager(); TransactionManager(ConnectionSource connectionSource); }
TransactionManager { public <T> T callInTransaction(final Callable<T> callable) throws SQLException { return callInTransaction(connectionSource, callable); } TransactionManager(); TransactionManager(ConnectionSource connectionSource); void initialize(); T callInTransaction(final Callable<T> callable); T callInTransact...
TransactionManager { public <T> T callInTransaction(final Callable<T> callable) throws SQLException { return callInTransaction(connectionSource, callable); } TransactionManager(); TransactionManager(ConnectionSource connectionSource); void initialize(); T callInTransaction(final Callable<T> callable); T callInTransact...
@Test public void testException() { Throwable cause = new Throwable(); String msg = "hello"; SQLException e = SqlExceptionUtil.create(msg, cause); assertEquals(msg, e.getMessage()); assertEquals(cause, e.getCause()); }
public static SQLException create(String message, Throwable cause) { SQLException sqlException; if (cause instanceof SQLException) { sqlException = new SQLException(message, ((SQLException) cause).getSQLState()); } else { sqlException = new SQLException(message); } sqlException.initCause(cause); return sqlException; }
SqlExceptionUtil { public static SQLException create(String message, Throwable cause) { SQLException sqlException; if (cause instanceof SQLException) { sqlException = new SQLException(message, ((SQLException) cause).getSQLState()); } else { sqlException = new SQLException(message); } sqlException.initCause(cause); retu...
SqlExceptionUtil { public static SQLException create(String message, Throwable cause) { SQLException sqlException; if (cause instanceof SQLException) { sqlException = new SQLException(message, ((SQLException) cause).getSQLState()); } else { sqlException = new SQLException(message); } sqlException.initCause(cause); retu...
SqlExceptionUtil { public static SQLException create(String message, Throwable cause) { SQLException sqlException; if (cause instanceof SQLException) { sqlException = new SQLException(message, ((SQLException) cause).getSQLState()); } else { sqlException = new SQLException(message); } sqlException.initCause(cause); retu...
SqlExceptionUtil { public static SQLException create(String message, Throwable cause) { SQLException sqlException; if (cause instanceof SQLException) { sqlException = new SQLException(message, ((SQLException) cause).getSQLState()); } else { sqlException = new SQLException(message); } sqlException.initCause(cause); retu...
@Test public void testExceptionWithSQLException() { String sqlReason = "sql exception message"; String sqlState = "sql exception state"; Throwable cause = new SQLException(sqlReason, sqlState); String msg = "hello"; SQLException e = SqlExceptionUtil.create(msg, cause); assertEquals(msg, e.getMessage()); assertEquals(sq...
public static SQLException create(String message, Throwable cause) { SQLException sqlException; if (cause instanceof SQLException) { sqlException = new SQLException(message, ((SQLException) cause).getSQLState()); } else { sqlException = new SQLException(message); } sqlException.initCause(cause); return sqlException; }
SqlExceptionUtil { public static SQLException create(String message, Throwable cause) { SQLException sqlException; if (cause instanceof SQLException) { sqlException = new SQLException(message, ((SQLException) cause).getSQLState()); } else { sqlException = new SQLException(message); } sqlException.initCause(cause); retu...
SqlExceptionUtil { public static SQLException create(String message, Throwable cause) { SQLException sqlException; if (cause instanceof SQLException) { sqlException = new SQLException(message, ((SQLException) cause).getSQLState()); } else { sqlException = new SQLException(message); } sqlException.initCause(cause); retu...
SqlExceptionUtil { public static SQLException create(String message, Throwable cause) { SQLException sqlException; if (cause instanceof SQLException) { sqlException = new SQLException(message, ((SQLException) cause).getSQLState()); } else { sqlException = new SQLException(message); } sqlException.initCause(cause); retu...
SqlExceptionUtil { public static SQLException create(String message, Throwable cause) { SQLException sqlException; if (cause instanceof SQLException) { sqlException = new SQLException(message, ((SQLException) cause).getSQLState()); } else { sqlException = new SQLException(message); } sqlException.initCause(cause); retu...
@Test public void testCreate() throws Exception { Dao<One, Integer> dao = createDao(One.class, true); One one = new One(); String stuff = "fewpfjewfew"; one.stuff = stuff; one.setDao(dao); assertEquals(1, one.create()); }
public int create() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.create(t); }
BaseDaoEnabled { public int create() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.create(t); } }
BaseDaoEnabled { public int create() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.create(t); } }
BaseDaoEnabled { public int create() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.create(t); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); void setDao(Dao<T, ID...
BaseDaoEnabled { public int create() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.create(t); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); void setDao(Dao<T, ID...
@Test(expected = SQLException.class) public void testCreateNoDao() throws Exception { One one = new One(); String stuff = "fewpfjewfew"; one.stuff = stuff; one.create(); }
public int create() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.create(t); }
BaseDaoEnabled { public int create() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.create(t); } }
BaseDaoEnabled { public int create() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.create(t); } }
BaseDaoEnabled { public int create() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.create(t); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); void setDao(Dao<T, ID...
BaseDaoEnabled { public int create() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.create(t); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); void setDao(Dao<T, ID...
@Test public void testStringLiteral() throws Exception { String sql = "select #if (:1 == 'hello') ok #end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList((Type) String.class)); n.checkAndBind(ctx); InvocationContext context = DefaultInvocationContext.creat...
final public void StringLiteral() throws ParseException { ASTStringLiteral jjtn000 = new ASTStringLiteral(JJTSTRINGLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1));Token t; try { t = jj_consume_token(STRING_LITERAL); jjtree.closeNodeScope(jjtn000, true); jjtc000 = f...
Parser implements ParserTreeConstants, ParserConstants { final public void StringLiteral() throws ParseException { ASTStringLiteral jjtn000 = new ASTStringLiteral(JJTSTRINGLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1));Token t; try { t = jj_consume_token(STRING_LI...
Parser implements ParserTreeConstants, ParserConstants { final public void StringLiteral() throws ParseException { ASTStringLiteral jjtn000 = new ASTStringLiteral(JJTSTRINGLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1));Token t; try { t = jj_consume_token(STRING_LI...
Parser implements ParserTreeConstants, ParserConstants { final public void StringLiteral() throws ParseException { ASTStringLiteral jjtn000 = new ASTStringLiteral(JJTSTRINGLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1));Token t; try { t = jj_consume_token(STRING_LI...
Parser implements ParserTreeConstants, ParserConstants { final public void StringLiteral() throws ParseException { ASTStringLiteral jjtn000 = new ASTStringLiteral(JJTSTRINGLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1));Token t; try { t = jj_consume_token(STRING_LI...
@Test public void testUpdate() throws Exception { Dao<One, Integer> dao = createDao(One.class, true); One one = new One(); String stuff1 = "fewpfjewfew"; one.stuff = stuff1; assertEquals(1, dao.create(one)); String stuff2 = "fjpfejpwewpfjewfew"; one.stuff = stuff2; assertEquals(1, one.update()); One one2 = dao.queryFor...
public int update() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.update(t); }
BaseDaoEnabled { public int update() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.update(t); } }
BaseDaoEnabled { public int update() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.update(t); } }
BaseDaoEnabled { public int update() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.update(t); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); void setDao(Dao<T, ID...
BaseDaoEnabled { public int update() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.update(t); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); void setDao(Dao<T, ID...
@Test public void testUpdateId() throws Exception { Dao<One, Integer> dao = createDao(One.class, true); One one = new One(); String stuff1 = "fewpfjewfew"; one.stuff = stuff1; assertEquals(1, dao.create(one)); int id = one.id; assertNotNull(dao.queryForId(id)); assertEquals(1, one.updateId(id + 1)); assertNull(dao.quer...
public int updateId(ID newId) throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.updateId(t, newId); }
BaseDaoEnabled { public int updateId(ID newId) throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.updateId(t, newId); } }
BaseDaoEnabled { public int updateId(ID newId) throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.updateId(t, newId); } }
BaseDaoEnabled { public int updateId(ID newId) throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.updateId(t, newId); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); vo...
BaseDaoEnabled { public int updateId(ID newId) throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.updateId(t, newId); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); vo...
@Test public void testDelete() throws Exception { Dao<One, Integer> dao = createDao(One.class, true); One one = new One(); String stuff1 = "fewpfjewfew"; one.stuff = stuff1; assertEquals(1, dao.create(one)); assertNotNull(dao.queryForId(one.id)); assertEquals(1, one.delete()); assertNull(dao.queryForId(one.id)); }
public int delete() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.delete(t); }
BaseDaoEnabled { public int delete() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.delete(t); } }
BaseDaoEnabled { public int delete() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.delete(t); } }
BaseDaoEnabled { public int delete() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.delete(t); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); void setDao(Dao<T, ID...
BaseDaoEnabled { public int delete() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.delete(t); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); void setDao(Dao<T, ID...
@Test(expected = IllegalArgumentException.class) public void testObjectEqualsNoDao() { One one = new One(); String stuff1 = "fewpfjewfew"; one.stuff = stuff1; one.objectToString(); }
public String objectToString() { try { checkForDao(); } catch (SQLException e) { throw new IllegalArgumentException(e); } @SuppressWarnings("unchecked") T t = (T) this; return dao.objectToString(t); }
BaseDaoEnabled { public String objectToString() { try { checkForDao(); } catch (SQLException e) { throw new IllegalArgumentException(e); } @SuppressWarnings("unchecked") T t = (T) this; return dao.objectToString(t); } }
BaseDaoEnabled { public String objectToString() { try { checkForDao(); } catch (SQLException e) { throw new IllegalArgumentException(e); } @SuppressWarnings("unchecked") T t = (T) this; return dao.objectToString(t); } }
BaseDaoEnabled { public String objectToString() { try { checkForDao(); } catch (SQLException e) { throw new IllegalArgumentException(e); } @SuppressWarnings("unchecked") T t = (T) this; return dao.objectToString(t); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToStrin...
BaseDaoEnabled { public String objectToString() { try { checkForDao(); } catch (SQLException e) { throw new IllegalArgumentException(e); } @SuppressWarnings("unchecked") T t = (T) this; return dao.objectToString(t); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToStrin...
@Test public void testExtractId() throws Exception { Dao<One, Integer> dao = createDao(One.class, true); One one = new One(); String stuff1 = "fewpfjewfew"; one.stuff = stuff1; assertEquals(1, dao.create(one)); assertEquals(one.id, (int) one.extractId()); }
public ID extractId() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.extractId(t); }
BaseDaoEnabled { public ID extractId() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.extractId(t); } }
BaseDaoEnabled { public ID extractId() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.extractId(t); } }
BaseDaoEnabled { public ID extractId() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.extractId(t); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); void setDao(Dao<...
BaseDaoEnabled { public ID extractId() throws SQLException { checkForDao(); @SuppressWarnings("unchecked") T t = (T) this; return dao.extractId(t); } int create(); int refresh(); int update(); int updateId(ID newId); int delete(); String objectToString(); ID extractId(); boolean objectsEqual(T other); void setDao(Dao<...
@Test public void testIsEnabled() { for (Level level : Level.values()) { reset(mockLog); expect(mockLog.isLevelEnabled(level)).andReturn(true); expect(mockLog.isLevelEnabled(level)).andReturn(false); replay(mockLog); assertTrue(logger.isLevelEnabled(level)); assertFalse(logger.isLevelEnabled(level)); verify(mockLog); }...
public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); }
Logger { public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); } }
Logger { public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); } Logger(Log log); }
Logger { public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); } Logger(Log log); boolean isLevelEnabled(Level level); void trace(String msg); void trace(String msg, Object arg0); void trace(String msg, Object arg0, Object arg1); void trace(String msg, Object arg0, Object arg1, Object arg2); vo...
Logger { public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); } Logger(Log log); boolean isLevelEnabled(Level level); void trace(String msg); void trace(String msg, Object arg0); void trace(String msg, Object arg0, Object arg1); void trace(String msg, Object arg0, Object arg1, Object arg2); vo...
@Test public void testShouldNotCallToString() throws Exception { for (Level level : Level.values()) { Method method = Logger.class.getMethod(getNameFromLevel(level), String.class, Object.class); reset(mockLog); expect(mockLog.isLevelEnabled(level)).andReturn(false); replay(mockLog); method.invoke(logger, "msg {}", new ...
public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); }
Logger { public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); } }
Logger { public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); } Logger(Log log); }
Logger { public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); } Logger(Log log); boolean isLevelEnabled(Level level); void trace(String msg); void trace(String msg, Object arg0); void trace(String msg, Object arg0, Object arg1); void trace(String msg, Object arg0, Object arg1, Object arg2); vo...
Logger { public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); } Logger(Log log); boolean isLevelEnabled(Level level); void trace(String msg); void trace(String msg, Object arg0); void trace(String msg, Object arg0, Object arg1); void trace(String msg, Object arg0, Object arg1, Object arg2); vo...
@Test public void testShouldCallToString() throws Exception { for (Level level : Level.values()) { Method method = Logger.class.getMethod(getNameFromLevel(level), String.class, Object.class); reset(mockLog); expect(mockLog.isLevelEnabled(level)).andReturn(true); replay(mockLog); try { method.invoke(logger, "msg {}", ne...
public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); }
Logger { public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); } }
Logger { public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); } Logger(Log log); }
Logger { public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); } Logger(Log log); boolean isLevelEnabled(Level level); void trace(String msg); void trace(String msg, Object arg0); void trace(String msg, Object arg0, Object arg1); void trace(String msg, Object arg0, Object arg1, Object arg2); vo...
Logger { public boolean isLevelEnabled(Level level) { return log.isLevelEnabled(level); } Logger(Log log); boolean isLevelEnabled(Level level); void trace(String msg); void trace(String msg, Object arg0); void trace(String msg, Object arg0, Object arg1); void trace(String msg, Object arg0, Object arg1, Object arg2); vo...
@Test public void testLevelProperty() { Log log = new LocalLog("foo"); if (log.isLevelEnabled(Level.TRACE)) { return; } System.setProperty(LocalLog.LOCAL_LOG_LEVEL_PROPERTY, "TRACE"); try { log = new LocalLog("foo"); assertTrue(log.isLevelEnabled(Level.TRACE)); } finally { System.clearProperty(LocalLog.LOCAL_LOG_LEVEL_...
@Override public boolean isLevelEnabled(Level level) { return this.level.isEnabled(level); }
LocalLog implements Log { @Override public boolean isLevelEnabled(Level level) { return this.level.isEnabled(level); } }
LocalLog implements Log { @Override public boolean isLevelEnabled(Level level) { return this.level.isEnabled(level); } LocalLog(String className); }
LocalLog implements Log { @Override public boolean isLevelEnabled(Level level) { return this.level.isEnabled(level); } LocalLog(String className); static void openLogFile(String logPath); @Override boolean isLevelEnabled(Level level); @Override void log(Level level, String msg); @Override void log(Level level, String m...
LocalLog implements Log { @Override public boolean isLevelEnabled(Level level) { return this.level.isEnabled(level); } LocalLog(String className); static void openLogFile(String logPath); @Override boolean isLevelEnabled(Level level); @Override void log(Level level, String msg); @Override void log(Level level, String m...
@Test(expected = IllegalArgumentException.class) public void testInvalidFileProperty() { LocalLog.openLogFile("not-a-proper-directory-name-we-hope/foo.txt"); }
public static void openLogFile(String logPath) { if (logPath == null) { printStream = System.out; } else { try { printStream = new PrintStream(new File(logPath)); } catch (FileNotFoundException e) { throw new IllegalArgumentException("Log file " + logPath + " was not found", e); } } }
LocalLog implements Log { public static void openLogFile(String logPath) { if (logPath == null) { printStream = System.out; } else { try { printStream = new PrintStream(new File(logPath)); } catch (FileNotFoundException e) { throw new IllegalArgumentException("Log file " + logPath + " was not found", e); } } } }
LocalLog implements Log { public static void openLogFile(String logPath) { if (logPath == null) { printStream = System.out; } else { try { printStream = new PrintStream(new File(logPath)); } catch (FileNotFoundException e) { throw new IllegalArgumentException("Log file " + logPath + " was not found", e); } } } LocalLog...
LocalLog implements Log { public static void openLogFile(String logPath) { if (logPath == null) { printStream = System.out; } else { try { printStream = new PrintStream(new File(logPath)); } catch (FileNotFoundException e) { throw new IllegalArgumentException("Log file " + logPath + " was not found", e); } } } LocalLog...
LocalLog implements Log { public static void openLogFile(String logPath) { if (logPath == null) { printStream = System.out; } else { try { printStream = new PrintStream(new File(logPath)); } catch (FileNotFoundException e) { throw new IllegalArgumentException("Log file " + logPath + " was not found", e); } } } LocalLog...
@Test public void testStringLiteral2() throws Exception { String sql = "select #if (:1 == 'hello') ok #end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList((Type) String.class)); n.checkAndBind(ctx); InvocationContext context = DefaultInvocationContext.crea...
final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); jjtn00...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
@Test public void testInvalidLevelsFile() { StringWriter stringWriter = new StringWriter(); stringWriter.write("x\n"); stringWriter.write("com\\.j256\\.ormlite\\.stmt\\.StatementExecutor = INVALID_LEVEL\n"); LocalLog.readLevelResourceFile(new ByteArrayInputStream(stringWriter.toString().getBytes())); }
static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE + "': " + e); } finally { ...
LocalLog implements Log { static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE ...
LocalLog implements Log { static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE ...
LocalLog implements Log { static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE ...
LocalLog implements Log { static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE ...
@Test public void testIoErrorsReadingLevelFile() { InputStream errorStream = new InputStream() { @Override public int read() throws IOException { throw new IOException("simulated exception"); } @Override public void close() throws IOException { throw new IOException("simulated exception"); } }; LocalLog.readLevelResour...
static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE + "': " + e); } finally { ...
LocalLog implements Log { static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE ...
LocalLog implements Log { static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE ...
LocalLog implements Log { static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE ...
LocalLog implements Log { static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE ...
@Test public void testInputStreamNull() { LocalLog.readLevelResourceFile(null); }
static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE + "': " + e); } finally { ...
LocalLog implements Log { static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE ...
LocalLog implements Log { static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE ...
LocalLog implements Log { static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE ...
LocalLog implements Log { static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println( "IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE ...
@Test public void testGetLoggerClass() { assertNotNull(LoggerFactory.getLogger(getClass())); }
public static Logger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); }
LoggerFactory { public static Logger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); } }
LoggerFactory { public static Logger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); } private LoggerFactory(); }
LoggerFactory { public static Logger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); } private LoggerFactory(); static Logger getLogger(Class<?> clazz); static Logger getLogger(String className); static String getSimpleClassName(String className); }
LoggerFactory { public static Logger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); } private LoggerFactory(); static Logger getLogger(Class<?> clazz); static Logger getLogger(String className); static String getSimpleClassName(String className); static final String LOG_TYPE_SYSTEM_PROPERTY; }
@Test public void testGetLoggerString() { assertNotNull(LoggerFactory.getLogger(getClass().getName())); }
public static Logger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); }
LoggerFactory { public static Logger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); } }
LoggerFactory { public static Logger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); } private LoggerFactory(); }
LoggerFactory { public static Logger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); } private LoggerFactory(); static Logger getLogger(Class<?> clazz); static Logger getLogger(String className); static String getSimpleClassName(String className); }
LoggerFactory { public static Logger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); } private LoggerFactory(); static Logger getLogger(Class<?> clazz); static Logger getLogger(String className); static String getSimpleClassName(String className); static final String LOG_TYPE_SYSTEM_PROPERTY; }
@Test public void testGetSimpleClassName() { String first = "foo"; String name = LoggerFactory.getSimpleClassName(first); assertEquals(first, name); String second = "bar"; String className = first + "." + second; name = LoggerFactory.getSimpleClassName(className); assertEquals(second, name); }
public static String getSimpleClassName(String className) { String[] parts = className.split("\\."); if (parts.length <= 1) { return className; } else { return parts[parts.length - 1]; } }
LoggerFactory { public static String getSimpleClassName(String className) { String[] parts = className.split("\\."); if (parts.length <= 1) { return className; } else { return parts[parts.length - 1]; } } }
LoggerFactory { public static String getSimpleClassName(String className) { String[] parts = className.split("\\."); if (parts.length <= 1) { return className; } else { return parts[parts.length - 1]; } } private LoggerFactory(); }
LoggerFactory { public static String getSimpleClassName(String className) { String[] parts = className.split("\\."); if (parts.length <= 1) { return className; } else { return parts[parts.length - 1]; } } private LoggerFactory(); static Logger getLogger(Class<?> clazz); static Logger getLogger(String className); stati...
LoggerFactory { public static String getSimpleClassName(String className) { String[] parts = className.split("\\."); if (parts.length <= 1) { return className; } else { return parts[parts.length - 1]; } } private LoggerFactory(); static Logger getLogger(Class<?> clazz); static Logger getLogger(String className); stati...
@Test(expected = IllegalArgumentException.class) public void testTableInfo() throws SQLException { new TableInfo<NoFieldAnnotations, Void>(connectionSource, null, NoFieldAnnotations.class); }
public TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass) throws SQLException { this(connectionSource.getDatabaseType(), baseDaoImpl, DatabaseTableConfig.fromClass(connectionSource, dataClass)); }
TableInfo { public TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass) throws SQLException { this(connectionSource.getDatabaseType(), baseDaoImpl, DatabaseTableConfig.fromClass(connectionSource, dataClass)); } }
TableInfo { public TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass) throws SQLException { this(connectionSource.getDatabaseType(), baseDaoImpl, DatabaseTableConfig.fromClass(connectionSource, dataClass)); } TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> b...
TableInfo { public TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass) throws SQLException { this(connectionSource.getDatabaseType(), baseDaoImpl, DatabaseTableConfig.fromClass(connectionSource, dataClass)); } TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> b...
TableInfo { public TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass) throws SQLException { this(connectionSource.getDatabaseType(), baseDaoImpl, DatabaseTableConfig.fromClass(connectionSource, dataClass)); } TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> b...
@Test public void testObjectToString() throws Exception { String id = "f11232oo"; Foo foo = new Foo(); foo.id = id; assertEquals(id, foo.id); TableInfo<Foo, String> tableInfo = new TableInfo<Foo, String>(connectionSource, null, Foo.class); assertTrue(tableInfo.objectToString(foo).contains(id)); }
public String objectToString(T object) { StringBuilder sb = new StringBuilder(64); sb.append(object.getClass().getSimpleName()); for (FieldType fieldType : fieldTypes) { sb.append(' ').append(fieldType.getColumnName()).append('='); try { sb.append(fieldType.extractJavaFieldValue(object)); } catch (Exception e) { throw ...
TableInfo { public String objectToString(T object) { StringBuilder sb = new StringBuilder(64); sb.append(object.getClass().getSimpleName()); for (FieldType fieldType : fieldTypes) { sb.append(' ').append(fieldType.getColumnName()).append('='); try { sb.append(fieldType.extractJavaFieldValue(object)); } catch (Exception...
TableInfo { public String objectToString(T object) { StringBuilder sb = new StringBuilder(64); sb.append(object.getClass().getSimpleName()); for (FieldType fieldType : fieldTypes) { sb.append(' ').append(fieldType.getColumnName()).append('='); try { sb.append(fieldType.extractJavaFieldValue(object)); } catch (Exception...
TableInfo { public String objectToString(T object) { StringBuilder sb = new StringBuilder(64); sb.append(object.getClass().getSimpleName()); for (FieldType fieldType : fieldTypes) { sb.append(' ').append(fieldType.getColumnName()).append('='); try { sb.append(fieldType.extractJavaFieldValue(object)); } catch (Exception...
TableInfo { public String objectToString(T object) { StringBuilder sb = new StringBuilder(64); sb.append(object.getClass().getSimpleName()); for (FieldType fieldType : fieldTypes) { sb.append(' ').append(fieldType.getColumnName()).append('='); try { sb.append(fieldType.extractJavaFieldValue(object)); } catch (Exception...
@Test public void testNoTableNameInAnnotation() throws Exception { TableInfo<NoTableNameAnnotation, Void> tableInfo = new TableInfo<NoTableNameAnnotation, Void>(connectionSource, null, NoTableNameAnnotation.class); assertEquals(NoTableNameAnnotation.class.getSimpleName().toLowerCase(), tableInfo.getTableName()); }
public String getTableName() { return tableName; }
TableInfo { public String getTableName() { return tableName; } }
TableInfo { public String getTableName() { return tableName; } TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass); TableInfo(DatabaseType databaseType, BaseDaoImpl<T, ID> baseDaoImpl, DatabaseTableConfig<T> tableConfig); }
TableInfo { public String getTableName() { return tableName; } TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass); TableInfo(DatabaseType databaseType, BaseDaoImpl<T, ID> baseDaoImpl, DatabaseTableConfig<T> tableConfig); Class<T> getDataClass(); String getTableName(); Fiel...
TableInfo { public String getTableName() { return tableName; } TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass); TableInfo(DatabaseType databaseType, BaseDaoImpl<T, ID> baseDaoImpl, DatabaseTableConfig<T> tableConfig); Class<T> getDataClass(); String getTableName(); Fiel...
@Test public void testConstruct() throws Exception { TableInfo<Foo, String> tableInfo = new TableInfo<Foo, String>(connectionSource, null, Foo.class); Foo foo = tableInfo.createObject(); assertNotNull(foo); }
public T createObject() throws SQLException { try { T instance; ObjectFactory<T> factory = null; if (baseDaoImpl != null) { factory = baseDaoImpl.getObjectFactory(); } if (factory == null) { instance = constructor.newInstance(); } else { instance = factory.createObject(constructor, baseDaoImpl.getDataClass()); } wireNe...
TableInfo { public T createObject() throws SQLException { try { T instance; ObjectFactory<T> factory = null; if (baseDaoImpl != null) { factory = baseDaoImpl.getObjectFactory(); } if (factory == null) { instance = constructor.newInstance(); } else { instance = factory.createObject(constructor, baseDaoImpl.getDataClass(...
TableInfo { public T createObject() throws SQLException { try { T instance; ObjectFactory<T> factory = null; if (baseDaoImpl != null) { factory = baseDaoImpl.getObjectFactory(); } if (factory == null) { instance = constructor.newInstance(); } else { instance = factory.createObject(constructor, baseDaoImpl.getDataClass(...
TableInfo { public T createObject() throws SQLException { try { T instance; ObjectFactory<T> factory = null; if (baseDaoImpl != null) { factory = baseDaoImpl.getObjectFactory(); } if (factory == null) { instance = constructor.newInstance(); } else { instance = factory.createObject(constructor, baseDaoImpl.getDataClass(...
TableInfo { public T createObject() throws SQLException { try { T instance; ObjectFactory<T> factory = null; if (baseDaoImpl != null) { factory = baseDaoImpl.getObjectFactory(); } if (factory == null) { instance = constructor.newInstance(); } else { instance = factory.createObject(constructor, baseDaoImpl.getDataClass(...
@Test public void testStringLiteral3() throws Exception { String sql = "select #if ('') ok #end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList((Type) String.class)); n.checkAndBind(ctx); InvocationContext context = DefaultInvocationContext.create(); conte...
final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); jjtn00...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
@Test public void testUnknownForeignField() throws Exception { TableInfo<Foreign, Void> tableInfo = new TableInfo<Foreign, Void>(connectionSource, null, Foreign.class); try { tableInfo.getFieldTypeByColumnName("foo"); fail("expected exception"); } catch (IllegalArgumentException e) { assertTrue(e.getMessage().contains(...
public FieldType getFieldTypeByColumnName(String columnName) { if (fieldNameMap == null) { Map<String, FieldType> map = new HashMap<String, FieldType>(); for (FieldType fieldType : fieldTypes) { map.put(fieldType.getColumnName().toLowerCase(), fieldType); } fieldNameMap = map; } FieldType fieldType = fieldNameMap.get(c...
TableInfo { public FieldType getFieldTypeByColumnName(String columnName) { if (fieldNameMap == null) { Map<String, FieldType> map = new HashMap<String, FieldType>(); for (FieldType fieldType : fieldTypes) { map.put(fieldType.getColumnName().toLowerCase(), fieldType); } fieldNameMap = map; } FieldType fieldType = fieldN...
TableInfo { public FieldType getFieldTypeByColumnName(String columnName) { if (fieldNameMap == null) { Map<String, FieldType> map = new HashMap<String, FieldType>(); for (FieldType fieldType : fieldTypes) { map.put(fieldType.getColumnName().toLowerCase(), fieldType); } fieldNameMap = map; } FieldType fieldType = fieldN...
TableInfo { public FieldType getFieldTypeByColumnName(String columnName) { if (fieldNameMap == null) { Map<String, FieldType> map = new HashMap<String, FieldType>(); for (FieldType fieldType : fieldTypes) { map.put(fieldType.getColumnName().toLowerCase(), fieldType); } fieldNameMap = map; } FieldType fieldType = fieldN...
TableInfo { public FieldType getFieldTypeByColumnName(String columnName) { if (fieldNameMap == null) { Map<String, FieldType> map = new HashMap<String, FieldType>(); for (FieldType fieldType : fieldTypes) { map.put(fieldType.getColumnName().toLowerCase(), fieldType); } fieldNameMap = map; } FieldType fieldType = fieldN...
@Test public void testHasColumnName() throws Exception { Dao<Foo, String> dao = createDao(Foo.class, true); TableInfo<Foo, String> tableInfo = ((BaseDaoImpl<Foo, String>) dao).getTableInfo(); assertTrue(tableInfo.hasColumnName(COLUMN_NAME)); assertFalse(tableInfo.hasColumnName("not this name")); }
public boolean hasColumnName(String columnName) { for (FieldType fieldType : fieldTypes) { if (fieldType.getColumnName().equals(columnName)) { return true; } } return false; }
TableInfo { public boolean hasColumnName(String columnName) { for (FieldType fieldType : fieldTypes) { if (fieldType.getColumnName().equals(columnName)) { return true; } } return false; } }
TableInfo { public boolean hasColumnName(String columnName) { for (FieldType fieldType : fieldTypes) { if (fieldType.getColumnName().equals(columnName)) { return true; } } return false; } TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass); TableInfo(DatabaseType databaseTy...
TableInfo { public boolean hasColumnName(String columnName) { for (FieldType fieldType : fieldTypes) { if (fieldType.getColumnName().equals(columnName)) { return true; } } return false; } TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass); TableInfo(DatabaseType databaseTy...
TableInfo { public boolean hasColumnName(String columnName) { for (FieldType fieldType : fieldTypes) { if (fieldType.getColumnName().equals(columnName)) { return true; } } return false; } TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass); TableInfo(DatabaseType databaseTy...
@Test public void testConfigFile() throws Exception { DatabaseTableConfig<NoFields> config = new DatabaseTableConfig<NoFields>(); StringBuilder body = new StringBuilder(); StringWriter writer = new StringWriter(); BufferedWriter buffer = new BufferedWriter(writer); Class<NoFields> clazz = NoFields.class; config.setData...
public static <T> void write(BufferedWriter writer, DatabaseTableConfig<T> config) throws SQLException { try { writeConfig(writer, config); } catch (IOException e) { throw SqlExceptionUtil.create("Could not write config to writer", e); } }
DatabaseTableConfigLoader { public static <T> void write(BufferedWriter writer, DatabaseTableConfig<T> config) throws SQLException { try { writeConfig(writer, config); } catch (IOException e) { throw SqlExceptionUtil.create("Could not write config to writer", e); } } }
DatabaseTableConfigLoader { public static <T> void write(BufferedWriter writer, DatabaseTableConfig<T> config) throws SQLException { try { writeConfig(writer, config); } catch (IOException e) { throw SqlExceptionUtil.create("Could not write config to writer", e); } } }
DatabaseTableConfigLoader { public static <T> void write(BufferedWriter writer, DatabaseTableConfig<T> config) throws SQLException { try { writeConfig(writer, config); } catch (IOException e) { throw SqlExceptionUtil.create("Could not write config to writer", e); } } static List<DatabaseTableConfig<?>> loadDatabaseCon...
DatabaseTableConfigLoader { public static <T> void write(BufferedWriter writer, DatabaseTableConfig<T> config) throws SQLException { try { writeConfig(writer, config); } catch (IOException e) { throw SqlExceptionUtil.create("Could not write config to writer", e); } } static List<DatabaseTableConfig<?>> loadDatabaseCon...
@Test public void testConfigEntriesFromStream() throws Exception { StringBuilder value = new StringBuilder(); value.append(TABLE_START); value.append("# random comment").append(LINE_SEP); value.append(LINE_SEP); value.append("dataClass=").append(Foo.class.getName()).append(LINE_SEP); String tableName = "fprwojfgopwejfw...
public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (config == null) { break; } li...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
@Test(expected = SQLException.class) public void testConfigInvalidLine() throws Exception { StringBuilder value = new StringBuilder(); value.append(TABLE_START); value.append("dataClass").append(LINE_SEP); DatabaseTableConfigLoader.loadDatabaseConfigFromReader(new BufferedReader(new StringReader(value.toString()))); }
public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (config == null) { break; } li...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
@Test(expected = IllegalArgumentException.class) public void testConfigUnknownClass() throws Exception { StringBuilder value = new StringBuilder(); value.append(TABLE_START); value.append("dataClass=unknown.class.name.okay").append(LINE_SEP); value.append("# --table-fields-start--").append(LINE_SEP); value.append("# --...
public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (config == null) { break; } li...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
@Test public void testQuickEndOfConfig() throws Exception { StringBuilder value = new StringBuilder(); value.append(TABLE_START); value.append("dataClass=").append(Foo.class.getName()).append(LINE_SEP); value.append("# --table-fields-start--").append(LINE_SEP); value.append("# --field-start--").append(LINE_SEP); value....
public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (config == null) { break; } li...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
DatabaseTableConfigLoader { public static List<DatabaseTableConfig<?>> loadDatabaseConfigFromReader(BufferedReader reader) throws SQLException { List<DatabaseTableConfig<?>> list = new ArrayList<DatabaseTableConfig<?>>(); while (true) { DatabaseTableConfig<?> config = DatabaseTableConfigLoader.fromReader(reader); if (c...
@Test public void testDatabaseTableConfig() throws SQLException { DatabaseTableConfig<DatabaseTableAnno> dbTableConf = DatabaseTableConfig.fromClass(connectionSource, DatabaseTableAnno.class); assertEquals(DatabaseTableAnno.class, dbTableConf.getDataClass()); assertEquals(TABLE_NAME, dbTableConf.getTableName()); dbTabl...
public DatabaseTableConfig() { }
DatabaseTableConfig { public DatabaseTableConfig() { } }
DatabaseTableConfig { public DatabaseTableConfig() { } DatabaseTableConfig(); DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig> fieldConfigs); DatabaseTableConfig(Class<T> dataClass, String tableName, List<DatabaseFieldConfig> fieldConfigs); private DatabaseTableConfig(Class<T> dataClass, String tabl...
DatabaseTableConfig { public DatabaseTableConfig() { } DatabaseTableConfig(); DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig> fieldConfigs); DatabaseTableConfig(Class<T> dataClass, String tableName, List<DatabaseFieldConfig> fieldConfigs); private DatabaseTableConfig(Class<T> dataClass, String tabl...
DatabaseTableConfig { public DatabaseTableConfig() { } DatabaseTableConfig(); DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig> fieldConfigs); DatabaseTableConfig(Class<T> dataClass, String tableName, List<DatabaseFieldConfig> fieldConfigs); private DatabaseTableConfig(Class<T> dataClass, String tabl...
@Test public void testSetFieldConfigs() throws SQLException { DatabaseTableConfig<DatabaseTableAnno> dbTableConf = new DatabaseTableConfig<DatabaseTableAnno>(); dbTableConf.setDataClass(DatabaseTableAnno.class); dbTableConf.setTableName(TABLE_NAME); List<DatabaseFieldConfig> fieldConfigs = new ArrayList<DatabaseFieldCo...
public void setFieldConfigs(List<DatabaseFieldConfig> fieldConfigs) { this.fieldConfigs = fieldConfigs; }
DatabaseTableConfig { public void setFieldConfigs(List<DatabaseFieldConfig> fieldConfigs) { this.fieldConfigs = fieldConfigs; } }
DatabaseTableConfig { public void setFieldConfigs(List<DatabaseFieldConfig> fieldConfigs) { this.fieldConfigs = fieldConfigs; } DatabaseTableConfig(); DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig> fieldConfigs); DatabaseTableConfig(Class<T> dataClass, String tableName, List<DatabaseFieldConfig> fi...
DatabaseTableConfig { public void setFieldConfigs(List<DatabaseFieldConfig> fieldConfigs) { this.fieldConfigs = fieldConfigs; } DatabaseTableConfig(); DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig> fieldConfigs); DatabaseTableConfig(Class<T> dataClass, String tableName, List<DatabaseFieldConfig> fi...
DatabaseTableConfig { public void setFieldConfigs(List<DatabaseFieldConfig> fieldConfigs) { this.fieldConfigs = fieldConfigs; } DatabaseTableConfig(); DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig> fieldConfigs); DatabaseTableConfig(Class<T> dataClass, String tableName, List<DatabaseFieldConfig> fi...
@Test(expected = IllegalStateException.class) public void testBadSpringWiring() { DatabaseTableConfig<NoFields> dbTableConf = new DatabaseTableConfig<NoFields>(); dbTableConf.initialize(); }
public void initialize() { if (dataClass == null) { throw new IllegalStateException("dataClass was never set on " + getClass().getSimpleName()); } if (tableName == null) { tableName = extractTableName(dataClass); } }
DatabaseTableConfig { public void initialize() { if (dataClass == null) { throw new IllegalStateException("dataClass was never set on " + getClass().getSimpleName()); } if (tableName == null) { tableName = extractTableName(dataClass); } } }
DatabaseTableConfig { public void initialize() { if (dataClass == null) { throw new IllegalStateException("dataClass was never set on " + getClass().getSimpleName()); } if (tableName == null) { tableName = extractTableName(dataClass); } } DatabaseTableConfig(); DatabaseTableConfig(Class<T> dataClass, List<DatabaseFiel...
DatabaseTableConfig { public void initialize() { if (dataClass == null) { throw new IllegalStateException("dataClass was never set on " + getClass().getSimpleName()); } if (tableName == null) { tableName = extractTableName(dataClass); } } DatabaseTableConfig(); DatabaseTableConfig(Class<T> dataClass, List<DatabaseFiel...
DatabaseTableConfig { public void initialize() { if (dataClass == null) { throw new IllegalStateException("dataClass was never set on " + getClass().getSimpleName()); } if (tableName == null) { tableName = extractTableName(dataClass); } } DatabaseTableConfig(); DatabaseTableConfig(Class<T> dataClass, List<DatabaseFiel...
@Test public void testStringLiteral4() throws Exception { String sql = "select #if (!'') ok #end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList((Type) String.class)); n.checkAndBind(ctx); InvocationContext context = DefaultInvocationContext.create(); cont...
final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); jjtn00...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
@Test public void testMsg() throws Exception { ConsoleLogger logger = new ConsoleLogger("org"); logger.trace("ok"); }
@Override public void trace(String msg) { println(msg); }
ConsoleLogger extends AbstractInternalLogger { @Override public void trace(String msg) { println(msg); } }
ConsoleLogger extends AbstractInternalLogger { @Override public void trace(String msg) { println(msg); } protected ConsoleLogger(String name); }
ConsoleLogger extends AbstractInternalLogger { @Override public void trace(String msg) { println(msg); } protected ConsoleLogger(String name); @Override boolean isTraceEnabled(); @Override void trace(String msg); @Override void trace(String format, Object arg); @Override void trace(String format, Object argA, Object a...
ConsoleLogger extends AbstractInternalLogger { @Override public void trace(String msg) { println(msg); } protected ConsoleLogger(String name); @Override boolean isTraceEnabled(); @Override void trace(String msg); @Override void trace(String format, Object arg); @Override void trace(String format, Object argA, Object a...
@Test(expected = SQLException.class) public void testNoFields() throws SQLException { new DatabaseTableConfig<DatabaseTableAnno>().getFieldTypes(databaseType); }
public FieldType[] getFieldTypes(DatabaseType databaseType) throws SQLException { if (fieldTypes == null) { throw new SQLException("Field types have not been extracted in table config"); } return fieldTypes; }
DatabaseTableConfig { public FieldType[] getFieldTypes(DatabaseType databaseType) throws SQLException { if (fieldTypes == null) { throw new SQLException("Field types have not been extracted in table config"); } return fieldTypes; } }
DatabaseTableConfig { public FieldType[] getFieldTypes(DatabaseType databaseType) throws SQLException { if (fieldTypes == null) { throw new SQLException("Field types have not been extracted in table config"); } return fieldTypes; } DatabaseTableConfig(); DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig...
DatabaseTableConfig { public FieldType[] getFieldTypes(DatabaseType databaseType) throws SQLException { if (fieldTypes == null) { throw new SQLException("Field types have not been extracted in table config"); } return fieldTypes; } DatabaseTableConfig(); DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig...
DatabaseTableConfig { public FieldType[] getFieldTypes(DatabaseType databaseType) throws SQLException { if (fieldTypes == null) { throw new SQLException("Field types have not been extracted in table config"); } return fieldTypes; } DatabaseTableConfig(); DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig...
@Test public void testCreateStatements() throws Exception { List<String> stmts = TableUtils.getCreateTableStatements(connectionSource, LocalFoo.class); assertEquals(1, stmts.size()); assertEquals(expectedCreateStatement(), stmts.get(0)); }
public static <T, ID> List<String> getCreateTableStatements(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); if (dao instanceof BaseDaoImpl<?, ?>) { return addCreateTableStatements(connectionSource, ((BaseDaoImpl<?, ?>) dao)...
TableUtils { public static <T, ID> List<String> getCreateTableStatements(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); if (dao instanceof BaseDaoImpl<?, ?>) { return addCreateTableStatements(connectionSource, ((BaseDaoImp...
TableUtils { public static <T, ID> List<String> getCreateTableStatements(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); if (dao instanceof BaseDaoImpl<?, ?>) { return addCreateTableStatements(connectionSource, ((BaseDaoImp...
TableUtils { public static <T, ID> List<String> getCreateTableStatements(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); if (dao instanceof BaseDaoImpl<?, ?>) { return addCreateTableStatements(connectionSource, ((BaseDaoImp...
TableUtils { public static <T, ID> List<String> getCreateTableStatements(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); if (dao instanceof BaseDaoImpl<?, ?>) { return addCreateTableStatements(connectionSource, ((BaseDaoImp...
@Test public void testCreateStatementsTableConfig() throws Exception { List<String> stmts = TableUtils.getCreateTableStatements(connectionSource, DatabaseTableConfig.fromClass(connectionSource, LocalFoo.class)); assertEquals(1, stmts.size()); assertEquals(expectedCreateStatement(), stmts.get(0)); }
public static <T, ID> List<String> getCreateTableStatements(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); if (dao instanceof BaseDaoImpl<?, ?>) { return addCreateTableStatements(connectionSource, ((BaseDaoImpl<?, ?>) dao)...
TableUtils { public static <T, ID> List<String> getCreateTableStatements(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); if (dao instanceof BaseDaoImpl<?, ?>) { return addCreateTableStatements(connectionSource, ((BaseDaoImp...
TableUtils { public static <T, ID> List<String> getCreateTableStatements(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); if (dao instanceof BaseDaoImpl<?, ?>) { return addCreateTableStatements(connectionSource, ((BaseDaoImp...
TableUtils { public static <T, ID> List<String> getCreateTableStatements(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); if (dao instanceof BaseDaoImpl<?, ?>) { return addCreateTableStatements(connectionSource, ((BaseDaoImp...
TableUtils { public static <T, ID> List<String> getCreateTableStatements(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); if (dao instanceof BaseDaoImpl<?, ?>) { return addCreateTableStatements(connectionSource, ((BaseDaoImp...
@Test public void testCreateTableQueriesAfter() throws Exception { final String queryAfter = "SELECT * from foo"; DatabaseType databaseType = new H2DatabaseType() { @Override public void appendColumnArg(String tableName, StringBuilder sb, FieldType fieldType, List<String> additionalArgs, List<String> statementsBefore, ...
public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Class<T> dat...
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Class<T> dat...
@Test(expected = SQLException.class) public void testCreateTableThrow() throws Exception { final ConnectionSource connectionSource = createMock(ConnectionSource.class); testCreate("localfoo", connectionSource, databaseType, 1, true, null, new Callable<Integer>() { @Override public Integer call() throws Exception { retu...
public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Class<T> dat...
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Class<T> dat...
@Test(expected = SQLException.class) public void testCreateTableAboveZero() throws Exception { final ConnectionSource connectionSource = createMock(ConnectionSource.class); testCreate("localfoo", connectionSource, databaseType, 1, false, null, new Callable<Integer>() { @Override public Integer call() throws Exception {...
public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Class<T> dat...
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Class<T> dat...
@Test(expected = SQLException.class) public void testCreateTableBelowZero() throws Exception { final ConnectionSource connectionSource = createMock(ConnectionSource.class); testCreate("localfoo", connectionSource, databaseType, -1, false, null, new Callable<Integer>() { @Override public Integer call() throws Exception ...
public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Class<T> dat...
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Class<T> dat...
@Test public void testCreateTableTableConfig() throws Exception { final ConnectionSource connectionSource = createMock(ConnectionSource.class); testCreate("localfoo", connectionSource, databaseType, 0, false, null, new Callable<Integer>() { @Override public Integer call() throws Exception { return (int) TableUtils.crea...
public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Class<T> dat...
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Class<T> dat...
@Test public void testDropTable() throws Exception { final ConnectionSource connectionSource = createMock(ConnectionSource.class); testDrop("localfoo", connectionSource, 0, false, new Callable<Integer>() { @Override public Integer call() throws Exception { return (int) TableUtils.dropTable(connectionSource, LocalFoo.cl...
public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); static int createTable(ConnectionSource co...
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); static int createTable(ConnectionSource co...
@Test(expected = SQLException.class) public void testDropTableThrow() throws Exception { final ConnectionSource connectionSource = createMock(ConnectionSource.class); testDrop("localfoo", connectionSource, 0, true, new Callable<Integer>() { @Override public Integer call() throws Exception { return (int) TableUtils.drop...
public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); static int createTable(ConnectionSource co...
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); static int createTable(ConnectionSource co...
@Test public void testStringLiteral5() throws Exception { String sql = "select #if (:1) ok #end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList((Type) String.class)); n.checkAndBind(ctx); InvocationContext context = DefaultInvocationContext.create(); conte...
final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); jjtn00...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
@Test public void testDropTableThrowIgnore() throws Exception { final ConnectionSource connectionSource = createMock(ConnectionSource.class); testDrop("localfoo", connectionSource, 0, true, new Callable<Integer>() { @Override public Integer call() throws Exception { return (int) TableUtils.dropTable(connectionSource, L...
public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); static int createTable(ConnectionSource co...
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); static int createTable(ConnectionSource co...
@Test(expected = SQLException.class) public void testDropTableNegRows() throws Exception { final ConnectionSource connectionSource = createMock(ConnectionSource.class); testDrop("localfoo", connectionSource, -1, false, new Callable<Integer>() { @Override public Integer call() throws Exception { return (int) TableUtils....
public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); static int createTable(ConnectionSource co...
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); static int createTable(ConnectionSource co...
@Test public void testDropTableTableConfig() throws Exception { final ConnectionSource connectionSource = createMock(ConnectionSource.class); testDrop("localfoo", connectionSource, 0, false, new Callable<Integer>() { @Override public Integer call() throws Exception { return (int) TableUtils.dropTable(connectionSource, ...
public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); static int createTable(ConnectionSource co...
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); static int createTable(ConnectionSource co...
@Test public void testCreateTable() throws Exception { Dao<LocalFoo, Integer> fooDao = createDao(LocalFoo.class, false); createTable(LocalFoo.class, false); assertEquals(0, fooDao.queryForAll().size()); dropTable(LocalFoo.class, true); try { fooDao.countOf(); fail("Was expecting a SQL exception"); } catch (Exception ex...
public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); }
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Class<T> dat...
TableUtils { public static <T> int createTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, false); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Class<T> dat...
@Test public void testDropThenQuery() throws Exception { Dao<LocalFoo, Integer> fooDao = createDao(LocalFoo.class, true); assertEquals(0, fooDao.queryForAll().size()); dropTable(LocalFoo.class, true); try { fooDao.queryForAll(); fail("Should have thrown"); } catch (SQLException e) { } }
public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); }
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); static int createTable(ConnectionSource co...
TableUtils { public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); } private TableUtils(); static int createTable(ConnectionSource co...
@Test public void testClearTable() throws Exception { Dao<LocalFoo, Integer> fooDao = createDao(LocalFoo.class, true); assertEquals(0, fooDao.countOf()); LocalFoo foo = new LocalFoo(); assertEquals(1, fooDao.create(foo)); assertEquals(1, fooDao.countOf()); TableUtils.clearTable(connectionSource, LocalFoo.class); assert...
public static <T> int clearTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { String tableName = DatabaseTableConfig.extractTableName(dataClass); DatabaseType databaseType = connectionSource.getDatabaseType(); if (databaseType.isEntityNamesMustBeUpCase()) { tableName = databaseType.upCas...
TableUtils { public static <T> int clearTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { String tableName = DatabaseTableConfig.extractTableName(dataClass); DatabaseType databaseType = connectionSource.getDatabaseType(); if (databaseType.isEntityNamesMustBeUpCase()) { tableName = datab...
TableUtils { public static <T> int clearTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { String tableName = DatabaseTableConfig.extractTableName(dataClass); DatabaseType databaseType = connectionSource.getDatabaseType(); if (databaseType.isEntityNamesMustBeUpCase()) { tableName = datab...
TableUtils { public static <T> int clearTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { String tableName = DatabaseTableConfig.extractTableName(dataClass); DatabaseType databaseType = connectionSource.getDatabaseType(); if (databaseType.isEntityNamesMustBeUpCase()) { tableName = datab...
TableUtils { public static <T> int clearTable(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { String tableName = DatabaseTableConfig.extractTableName(dataClass); DatabaseType databaseType = connectionSource.getDatabaseType(); if (databaseType.isEntityNamesMustBeUpCase()) { tableName = datab...
@Test public void testCreateTableIfNotExists() throws Exception { dropTable(LocalFoo.class, true); Dao<LocalFoo, Integer> fooDao = createDao(LocalFoo.class, false); try { fooDao.countOf(); fail("Should have thrown an exception"); } catch (Exception e) { } TableUtils.createTableIfNotExists(connectionSource, LocalFoo.cla...
public static <T> int createTableIfNotExists(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, true); }
TableUtils { public static <T> int createTableIfNotExists(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, true); } }
TableUtils { public static <T> int createTableIfNotExists(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, true); } private TableUtils(); }
TableUtils { public static <T> int createTableIfNotExists(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, true); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Cl...
TableUtils { public static <T> int createTableIfNotExists(ConnectionSource connectionSource, Class<T> dataClass) throws SQLException { Dao<T, ?> dao = DaoManager.createDao(connectionSource, dataClass); return doCreateTable(dao, true); } private TableUtils(); static int createTable(ConnectionSource connectionSource, Cl...
@Test(expected = SQLException.class) public void testDriverNotFound() throws SQLException { new TestDatabaseType().loadDriver(); }
@Override public void loadDriver() throws SQLException { String className = getDriverClassName(); if (className != null) { try { Class.forName(className); } catch (ClassNotFoundException e) { throw SqlExceptionUtil.create("Driver class was not found for " + getDatabaseName() + " database. Missing jar with class " + cla...
BaseDatabaseType implements DatabaseType { @Override public void loadDriver() throws SQLException { String className = getDriverClassName(); if (className != null) { try { Class.forName(className); } catch (ClassNotFoundException e) { throw SqlExceptionUtil.create("Driver class was not found for " + getDatabaseName() +...
BaseDatabaseType implements DatabaseType { @Override public void loadDriver() throws SQLException { String className = getDriverClassName(); if (className != null) { try { Class.forName(className); } catch (ClassNotFoundException e) { throw SqlExceptionUtil.create("Driver class was not found for " + getDatabaseName() +...
BaseDatabaseType implements DatabaseType { @Override public void loadDriver() throws SQLException { String className = getDriverClassName(); if (className != null) { try { Class.forName(className); } catch (ClassNotFoundException e) { throw SqlExceptionUtil.create("Driver class was not found for " + getDatabaseName() +...
BaseDatabaseType implements DatabaseType { @Override public void loadDriver() throws SQLException { String className = getDriverClassName(); if (className != null) { try { Class.forName(className); } catch (ClassNotFoundException e) { throw SqlExceptionUtil.create("Driver class was not found for " + getDatabaseName() +...
@Test(expected = IllegalStateException.class) public void testConfigureGeneratedId() { new TestDatabaseType().configureGeneratedId(null, new StringBuilder(), null, new ArrayList<String>(), null, new ArrayList<String>(), new ArrayList<String>()); }
protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { throw new IllegalStateException( "GeneratedId is not supported by database " + getDatabaseName() + " for fie...
BaseDatabaseType implements DatabaseType { protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { throw new IllegalStateException( "GeneratedId is not supported by...
BaseDatabaseType implements DatabaseType { protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { throw new IllegalStateException( "GeneratedId is not supported by...
BaseDatabaseType implements DatabaseType { protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { throw new IllegalStateException( "GeneratedId is not supported by...
BaseDatabaseType implements DatabaseType { protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { throw new IllegalStateException( "GeneratedId is not supported by...
@Test(expected = IllegalArgumentException.class) public void testConfigureGeneratedIdNotInteger() throws Exception { Field field = Foo.class.getField("stringField"); FieldType fieldType = FieldType.createFieldType(connectionSource, "foo", field, Foo.class); OurSqliteDatabaseType dbType = new OurSqliteDatabaseType(); St...
@Override protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { if (fieldType.getSqlType() != SqlType.INTEGER && fieldType.getSqlType() != SqlType.LONG) { throw n...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { if (fieldType.getSqlType() != SqlType.INTEGER &&...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { if (fieldType.getSqlType() != SqlType.INTEGER &&...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { if (fieldType.getSqlType() != SqlType.INTEGER &&...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { if (fieldType.getSqlType() != SqlType.INTEGER &&...
@Test public void testStringLiteral6() throws Exception { String sql = "select #if (:1) ok #end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList((Type) String.class)); n.checkAndBind(ctx); InvocationContext context = DefaultInvocationContext.create(); conte...
final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); jjtn00...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
@Test public void testConfigureGeneratedIdInteger() throws Exception { Field field = Foo.class.getField("val"); FieldType fieldType = FieldType.createFieldType(connectionSource, "foo", field, Foo.class); OurSqliteDatabaseType dbType = new OurSqliteDatabaseType(); StringBuilder sb = new StringBuilder(); dbType.configure...
@Override protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { if (fieldType.getSqlType() != SqlType.INTEGER && fieldType.getSqlType() != SqlType.LONG) { throw n...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { if (fieldType.getSqlType() != SqlType.INTEGER &&...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { if (fieldType.getSqlType() != SqlType.INTEGER &&...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { if (fieldType.getSqlType() != SqlType.INTEGER &&...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override protected void configureGeneratedId(String tableName, StringBuilder sb, FieldType fieldType, List<String> statementsBefore, List<String> statementsAfter, List<String> additionalArgs, List<String> queriesAfter) { if (fieldType.getSqlType() != SqlType.INTEGER &&...
@Test public void testIsVarcharFieldWidthSupported() { assertFalse(new OurSqliteDatabaseType().isVarcharFieldWidthSupported()); }
@Override public boolean isVarcharFieldWidthSupported() { return false; }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public boolean isVarcharFieldWidthSupported() { return false; } }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public boolean isVarcharFieldWidthSupported() { return false; } }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public boolean isVarcharFieldWidthSupported() { return false; } @Override boolean isVarcharFieldWidthSupported(); @Override boolean isCreateTableReturnsZero(); @Override boolean isCreateIfNotExistsSupported(); @Override FieldConverter getFieldConverter(DataPe...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public boolean isVarcharFieldWidthSupported() { return false; } @Override boolean isVarcharFieldWidthSupported(); @Override boolean isCreateTableReturnsZero(); @Override boolean isCreateIfNotExistsSupported(); @Override FieldConverter getFieldConverter(DataPe...
@Test public void testIsCreateTableReturnsZero() { assertFalse(new OurSqliteDatabaseType().isCreateTableReturnsZero()); }
@Override public boolean isCreateTableReturnsZero() { return false; }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public boolean isCreateTableReturnsZero() { return false; } }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public boolean isCreateTableReturnsZero() { return false; } }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public boolean isCreateTableReturnsZero() { return false; } @Override boolean isVarcharFieldWidthSupported(); @Override boolean isCreateTableReturnsZero(); @Override boolean isCreateIfNotExistsSupported(); @Override FieldConverter getFieldConverter(DataPersis...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public boolean isCreateTableReturnsZero() { return false; } @Override boolean isVarcharFieldWidthSupported(); @Override boolean isCreateTableReturnsZero(); @Override boolean isCreateIfNotExistsSupported(); @Override FieldConverter getFieldConverter(DataPersis...
@Test public void testGeneratedIdSqlAtEnd() { assertFalse(new OurSqliteDatabaseType().generatedIdSqlAtEnd()); }
@Override protected boolean generatedIdSqlAtEnd() { return false; }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override protected boolean generatedIdSqlAtEnd() { return false; } }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override protected boolean generatedIdSqlAtEnd() { return false; } }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override protected boolean generatedIdSqlAtEnd() { return false; } @Override boolean isVarcharFieldWidthSupported(); @Override boolean isCreateTableReturnsZero(); @Override boolean isCreateIfNotExistsSupported(); @Override FieldConverter getFieldConverter(DataPersiste...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override protected boolean generatedIdSqlAtEnd() { return false; } @Override boolean isVarcharFieldWidthSupported(); @Override boolean isCreateTableReturnsZero(); @Override boolean isCreateIfNotExistsSupported(); @Override FieldConverter getFieldConverter(DataPersiste...
@Test public void testIsCreateIfNotExistsSupported() { assertTrue(new OurSqliteDatabaseType().isCreateIfNotExistsSupported()); }
@Override public boolean isCreateIfNotExistsSupported() { return true; }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public boolean isCreateIfNotExistsSupported() { return true; } }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public boolean isCreateIfNotExistsSupported() { return true; } }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public boolean isCreateIfNotExistsSupported() { return true; } @Override boolean isVarcharFieldWidthSupported(); @Override boolean isCreateTableReturnsZero(); @Override boolean isCreateIfNotExistsSupported(); @Override FieldConverter getFieldConverter(DataPer...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public boolean isCreateIfNotExistsSupported() { return true; } @Override boolean isVarcharFieldWidthSupported(); @Override boolean isCreateTableReturnsZero(); @Override boolean isCreateIfNotExistsSupported(); @Override FieldConverter getFieldConverter(DataPer...
@Test public void testGetFieldConverter() throws Exception { OurSqliteDatabaseType dbType = new OurSqliteDatabaseType(); assertEquals(Byte.valueOf((byte) 1), dbType.getFieldConverter(DataType.BOOLEAN.getDataPersister(), null) .parseDefaultString(null, "true")); }
@Override public FieldConverter getFieldConverter(DataPersister dataPersister, FieldType fieldType) { switch (dataPersister.getSqlType()) { case BOOLEAN : return booleanConverter; case BIG_DECIMAL : return BigDecimalStringType.getSingleton(); default : return super.getFieldConverter(dataPersister, fieldType); } }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public FieldConverter getFieldConverter(DataPersister dataPersister, FieldType fieldType) { switch (dataPersister.getSqlType()) { case BOOLEAN : return booleanConverter; case BIG_DECIMAL : return BigDecimalStringType.getSingleton(); default : return super.getF...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public FieldConverter getFieldConverter(DataPersister dataPersister, FieldType fieldType) { switch (dataPersister.getSqlType()) { case BOOLEAN : return booleanConverter; case BIG_DECIMAL : return BigDecimalStringType.getSingleton(); default : return super.getF...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public FieldConverter getFieldConverter(DataPersister dataPersister, FieldType fieldType) { switch (dataPersister.getSqlType()) { case BOOLEAN : return booleanConverter; case BIG_DECIMAL : return BigDecimalStringType.getSingleton(); default : return super.getF...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public FieldConverter getFieldConverter(DataPersister dataPersister, FieldType fieldType) { switch (dataPersister.getSqlType()) { case BOOLEAN : return booleanConverter; case BIG_DECIMAL : return BigDecimalStringType.getSingleton(); default : return super.getF...
@Test public void testDefaultFieldConverter() { OurSqliteDatabaseType dbType = new OurSqliteDatabaseType(); assertSame(DataType.STRING.getDataPersister(), dbType.getFieldConverter(DataType.STRING.getDataPersister(), null)); }
@Override public FieldConverter getFieldConverter(DataPersister dataPersister, FieldType fieldType) { switch (dataPersister.getSqlType()) { case BOOLEAN : return booleanConverter; case BIG_DECIMAL : return BigDecimalStringType.getSingleton(); default : return super.getFieldConverter(dataPersister, fieldType); } }
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public FieldConverter getFieldConverter(DataPersister dataPersister, FieldType fieldType) { switch (dataPersister.getSqlType()) { case BOOLEAN : return booleanConverter; case BIG_DECIMAL : return BigDecimalStringType.getSingleton(); default : return super.getF...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public FieldConverter getFieldConverter(DataPersister dataPersister, FieldType fieldType) { switch (dataPersister.getSqlType()) { case BOOLEAN : return booleanConverter; case BIG_DECIMAL : return BigDecimalStringType.getSingleton(); default : return super.getF...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public FieldConverter getFieldConverter(DataPersister dataPersister, FieldType fieldType) { switch (dataPersister.getSqlType()) { case BOOLEAN : return booleanConverter; case BIG_DECIMAL : return BigDecimalStringType.getSingleton(); default : return super.getF...
BaseSqliteDatabaseType extends BaseDatabaseType { @Override public FieldConverter getFieldConverter(DataPersister dataPersister, FieldType fieldType) { switch (dataPersister.getSqlType()) { case BOOLEAN : return booleanConverter; case BIG_DECIMAL : return BigDecimalStringType.getSingleton(); default : return super.getF...
@Test(expected = IllegalArgumentException.class) public void testUnknownEnumVal() throws Exception { Field[] fields = BadUnknownVal.class.getDeclaredFields(); assertTrue(fields.length >= 1); DatabaseFieldConfig.fromField(databaseType, "foo", fields[0]); }
public static DatabaseFieldConfig fromField(DatabaseType databaseType, String tableName, Field field) throws SQLException { DatabaseField databaseField = field.getAnnotation(DatabaseField.class); if (databaseField != null) { if (databaseField.persisted()) { return fromDatabaseField(databaseType, tableName, field, datab...
DatabaseFieldConfig { public static DatabaseFieldConfig fromField(DatabaseType databaseType, String tableName, Field field) throws SQLException { DatabaseField databaseField = field.getAnnotation(DatabaseField.class); if (databaseField != null) { if (databaseField.persisted()) { return fromDatabaseField(databaseType, t...
DatabaseFieldConfig { public static DatabaseFieldConfig fromField(DatabaseType databaseType, String tableName, Field field) throws SQLException { DatabaseField databaseField = field.getAnnotation(DatabaseField.class); if (databaseField != null) { if (databaseField.persisted()) { return fromDatabaseField(databaseType, t...
DatabaseFieldConfig { public static DatabaseFieldConfig fromField(DatabaseType databaseType, String tableName, Field field) throws SQLException { DatabaseField databaseField = field.getAnnotation(DatabaseField.class); if (databaseField != null) { if (databaseField.persisted()) { return fromDatabaseField(databaseType, t...
DatabaseFieldConfig { public static DatabaseFieldConfig fromField(DatabaseType databaseType, String tableName, Field field) throws SQLException { DatabaseField databaseField = field.getAnnotation(DatabaseField.class); if (databaseField != null) { if (databaseField.persisted()) { return fromDatabaseField(databaseType, t...
@Test public void testNotPersisted() throws Exception { DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, "foo", NotPersisted.class.getDeclaredField("field")); assertNull(fieldConfig); }
public static DatabaseFieldConfig fromField(DatabaseType databaseType, String tableName, Field field) throws SQLException { DatabaseField databaseField = field.getAnnotation(DatabaseField.class); if (databaseField != null) { if (databaseField.persisted()) { return fromDatabaseField(databaseType, tableName, field, datab...
DatabaseFieldConfig { public static DatabaseFieldConfig fromField(DatabaseType databaseType, String tableName, Field field) throws SQLException { DatabaseField databaseField = field.getAnnotation(DatabaseField.class); if (databaseField != null) { if (databaseField.persisted()) { return fromDatabaseField(databaseType, t...
DatabaseFieldConfig { public static DatabaseFieldConfig fromField(DatabaseType databaseType, String tableName, Field field) throws SQLException { DatabaseField databaseField = field.getAnnotation(DatabaseField.class); if (databaseField != null) { if (databaseField.persisted()) { return fromDatabaseField(databaseType, t...
DatabaseFieldConfig { public static DatabaseFieldConfig fromField(DatabaseType databaseType, String tableName, Field field) throws SQLException { DatabaseField databaseField = field.getAnnotation(DatabaseField.class); if (databaseField != null) { if (databaseField.persisted()) { return fromDatabaseField(databaseType, t...
DatabaseFieldConfig { public static DatabaseFieldConfig fromField(DatabaseType databaseType, String tableName, Field field) throws SQLException { DatabaseField databaseField = field.getAnnotation(DatabaseField.class); if (databaseField != null) { if (databaseField.persisted()) { return fromDatabaseField(databaseType, t...
@Test public void testFieldType() throws Exception { Field[] fields = LocalFoo.class.getDeclaredFields(); assertTrue(fields.length >= 4); Field nameField = fields[0]; Field rankField = fields[1]; Field serialField = fields[2]; Field intLongField = fields[3]; FieldType fieldType = FieldType.createFieldType(connectionSou...
public FieldType(ConnectionSource connectionSource, String tableName, Field field, DatabaseFieldConfig fieldConfig, Class<?> parentClass) throws SQLException { this.connectionSource = connectionSource; this.tableName = tableName; DatabaseType databaseType = connectionSource.getDatabaseType(); this.field = field; this.p...
FieldType { public FieldType(ConnectionSource connectionSource, String tableName, Field field, DatabaseFieldConfig fieldConfig, Class<?> parentClass) throws SQLException { this.connectionSource = connectionSource; this.tableName = tableName; DatabaseType databaseType = connectionSource.getDatabaseType(); this.field = f...
FieldType { public FieldType(ConnectionSource connectionSource, String tableName, Field field, DatabaseFieldConfig fieldConfig, Class<?> parentClass) throws SQLException { this.connectionSource = connectionSource; this.tableName = tableName; DatabaseType databaseType = connectionSource.getDatabaseType(); this.field = f...
FieldType { public FieldType(ConnectionSource connectionSource, String tableName, Field field, DatabaseFieldConfig fieldConfig, Class<?> parentClass) throws SQLException { this.connectionSource = connectionSource; this.tableName = tableName; DatabaseType databaseType = connectionSource.getDatabaseType(); this.field = f...
FieldType { public FieldType(ConnectionSource connectionSource, String tableName, Field field, DatabaseFieldConfig fieldConfig, Class<?> parentClass) throws SQLException { this.connectionSource = connectionSource; this.tableName = tableName; DatabaseType databaseType = connectionSource.getDatabaseType(); this.field = f...
@Test public void testQuote() throws Exception { String sql = "insert into table ... values(':dd',':xx')"; ASTRootNode n = new Parser(sql).parse().init(); List<Type> types = Lists.newArrayList(); ParameterContext ctx = getParameterContext(types); n.checkAndBind(ctx); InvocationContext context = DefaultInvocationContext...
final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); jjtn00...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
@Test(expected = IllegalArgumentException.class) public void testUnknownFieldType() throws Exception { Field[] fields = UnknownFieldType.class.getDeclaredFields(); assertTrue(fields.length >= 1); FieldType.createFieldType(connectionSource, UnknownFieldType.class.getSimpleName(), fields[0], UnknownFieldType.class); }
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = IllegalArgumentException.class) public void testIdAndGeneratedId() throws Exception { Field[] fields = IdAndGeneratedId.class.getDeclaredFields(); assertTrue(fields.length >= 1); FieldType.createFieldType(connectionSource, IdAndGeneratedId.class.getSimpleName(), fields[0], IdAndGeneratedId.class); }
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = IllegalArgumentException.class) public void testGeneratedIdAndSequence() throws Exception { Field[] fields = GeneratedIdAndSequence.class.getDeclaredFields(); assertTrue(fields.length >= 1); FieldType.createFieldType(connectionSource, GeneratedIdAndSequence.class.getSimpleName(), fields[0], GeneratedId...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = IllegalArgumentException.class) public void testGeneratedIdCantBeGenerated() throws Exception { Field[] fields = GeneratedIdCantBeGenerated.class.getDeclaredFields(); assertTrue(fields.length >= 1); FieldType.createFieldType(connectionSource, GeneratedIdCantBeGenerated.class.getSimpleName(), fields[0],...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = IllegalArgumentException.class) public void testPrimitiveForeign() throws Exception { Field[] fields = ForeignPrimitive.class.getDeclaredFields(); assertTrue(fields.length >= 1); Field idField = fields[0]; FieldType.createFieldType(connectionSource, ForeignPrimitive.class.getSimpleName(), idField, Fore...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = IllegalArgumentException.class) public void testForeignAlsoId() throws Exception { Field[] fields = ForeignAlsoId.class.getDeclaredFields(); assertTrue(fields.length >= 1); Field fooField = fields[0]; FieldType.createFieldType(connectionSource, ForeignAlsoId.class.getSimpleName(), fooField, ForeignAlso...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = IllegalArgumentException.class) public void testObjectFieldNotForeign() throws Exception { Field[] fields = ObjectFieldNotForeign.class.getDeclaredFields(); assertTrue(fields.length >= 1); Field fooField = fields[0]; FieldType.createFieldType(connectionSource, ObjectFieldNotForeign.class.getSimpleName(...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = IllegalArgumentException.class) public void testGetSetNoGet() throws Exception { Field[] fields = GetSetNoGet.class.getDeclaredFields(); assertTrue(fields.length >= 1); Field idField = fields[0]; FieldType.createFieldType(connectionSource, GetSetNoGet.class.getSimpleName(), idField, GetSetNoGet.class);...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = IllegalArgumentException.class) public void testGetSetGetWrongType() throws Exception { Field[] fields = GetSetGetWrongType.class.getDeclaredFields(); assertTrue(fields.length >= 1); Field idField = fields[0]; FieldType.createFieldType(connectionSource, GetSetGetWrongType.class.getSimpleName(), idField...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = IllegalArgumentException.class) public void testGetSetNoSet() throws Exception { Field[] fields = GetSetNoSet.class.getDeclaredFields(); assertTrue(fields.length >= 1); Field idField = fields[0]; FieldType.createFieldType(connectionSource, GetSetNoSet.class.getSimpleName(), idField, GetSetNoSet.class);...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test public void testExpressionParameter4In() throws Exception { String sql = "select #if (:1) id in (:1) #end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList(new TypeToken<List<Integer>>(){}.getType())); n.checkAndBind(ctx); InvocationContext context = D...
final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); jjtn00...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
@Test(expected = IllegalArgumentException.class) public void testGetSetSetWrongType() throws Exception { Field[] fields = GetSetSetWrongType.class.getDeclaredFields(); assertTrue(fields.length >= 1); Field idField = fields[0]; FieldType.createFieldType(connectionSource, GetSetSetWrongType.class.getSimpleName(), idField...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = IllegalArgumentException.class) public void testGetSetSetReturnNotVoid() throws Exception { Field[] fields = GetSetReturnNotVoid.class.getDeclaredFields(); assertNotNull(fields); assertTrue(fields.length >= 1); Field idField = fields[0]; FieldType.createFieldType(connectionSource, GetSetReturnNotVoid.c...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test public void testGetSet() throws Exception { Field[] fields = GetSet.class.getDeclaredFields(); assertTrue(fields.length >= 1); Field idField = fields[0]; FieldType.createFieldType(connectionSource, GetSet.class.getSimpleName(), idField, GetSet.class); }
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test public void testCreateFieldTypeNull() throws Exception { Field[] fields = NoAnnotation.class.getDeclaredFields(); assertTrue(fields.length >= 1); Field idField = fields[0]; assertNull(FieldType.createFieldType(connectionSource, NoAnnotation.class.getSimpleName(), idField, NoAnnotation.class)); }
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = SQLException.class) public void testGeneratedIdDefaultValue() throws Exception { Field[] fields = GeneratedIdDefault.class.getDeclaredFields(); assertTrue(fields.length >= 1); Field idField = fields[0]; FieldType.createFieldType(connectionSource, GeneratedIdDefault.class.getSimpleName(), idField, Gener...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = SQLException.class) public void testThrowIfNullNotPrimitive() throws Exception { Field[] fields = ThrowIfNullNonPrimitive.class.getDeclaredFields(); assertTrue(fields.length >= 1); Field field = fields[0]; FieldType.createFieldType(connectionSource, ThrowIfNullNonPrimitive.class.getSimpleName(), field,...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = SQLException.class) public void testBadDateDefaultValue() throws Exception { Field[] fields = DateDefaultBad.class.getDeclaredFields(); assertTrue(fields.length >= 1); Field field = fields[0]; FieldType.createFieldType(connectionSource, DateDefaultBad.class.getSimpleName(), field, DateDefaultBad.class)...
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = IllegalArgumentException.class) public void testInvalidEnumField() throws Exception { Field field = InvalidEnumType.class.getDeclaredField("stuff"); FieldType.createFieldType(connectionSource, InvalidEnumType.class.getSimpleName(), field, InvalidEnumType.class); }
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test public void testRecursiveForeign() throws Exception { Field field = Recursive.class.getDeclaredField("foreign"); FieldType.createFieldType(connectionSource, Recursive.class.getSimpleName(), field, Recursive.class); }
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = SQLException.class) public void testSerializableNoDataType() throws Exception { Field field = SerializableNoDataType.class.getDeclaredField("serial"); FieldType.createFieldType(connectionSource, SerializableNoDataType.class.getSimpleName(), field, SerializableNoDataType.class); }
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test public void testExpressionParameter4InEmpty() throws Exception { String sql = "select #if (:1) id in (:1) #end"; ASTRootNode n = new Parser(sql).parse().init(); ParameterContext ctx = getParameterContext(Lists.newArrayList(new TypeToken<List<Integer>>(){}.getType())); n.checkAndBind(ctx); InvocationContext contex...
final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); jjtn00...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
Parser implements ParserTreeConstants, ParserConstants { final public ASTRootNode parse() throws ParseException { ASTRootNode jjtn000 = new ASTRootNode(JJTROOTNODE); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { DML(); ASTBlock jjtn001 = new ASTBlock(JJTBLOCK); bool...
@Test(expected = SQLException.class) public void testByteArrayNoDataType() throws Exception { Field field = ByteArrayNoDataType.class.getDeclaredField("bytes"); FieldType.createFieldType(connectionSource, ByteArrayNoDataType.class.getSimpleName(), field, ByteArrayNoDataType.class); }
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = SQLException.class) public void testForeignCollectionNoGeneric() throws Exception { Field field = ForeignCollectionNoGeneric.class.getDeclaredField("foreignStuff"); FieldType.createFieldType(connectionSource, ForeignCollectionNoGeneric.class.getSimpleName(), field, ForeignCollectionNoGeneric.class); }
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test(expected = SQLException.class) public void testImproperId() throws Exception { Field field = ImproperIdType.class.getDeclaredField("id"); FieldType.createFieldType(connectionSource, ImproperIdType.class.getSimpleName(), field, ImproperIdType.class); }
public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field); if (field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
FieldType { public static FieldType createFieldType(ConnectionSource connectionSource, String tableName, Field field, Class<?> parentClass) throws SQLException { DatabaseType databaseType = connectionSource.getDatabaseType(); DatabaseFieldConfig fieldConfig = DatabaseFieldConfig.fromField(databaseType, tableName, field...
@Test public void testEquals() throws Exception { Field field1 = DefaultTypes.class.getDeclaredField("booleanField"); FieldType fieldType1 = FieldType.createFieldType(connectionSource, DefaultTypes.class.getSimpleName(), field1, DefaultTypes.class); FieldType fieldType2 = FieldType.createFieldType(connectionSource, Def...
@Override public boolean equals(Object arg) { if (arg == null || arg.getClass() != this.getClass()) { return false; } FieldType other = (FieldType) arg; return field.equals(other.field) && (parentClass == null ? other.parentClass == null : parentClass.equals(other.parentClass)); }
FieldType { @Override public boolean equals(Object arg) { if (arg == null || arg.getClass() != this.getClass()) { return false; } FieldType other = (FieldType) arg; return field.equals(other.field) && (parentClass == null ? other.parentClass == null : parentClass.equals(other.parentClass)); } }
FieldType { @Override public boolean equals(Object arg) { if (arg == null || arg.getClass() != this.getClass()) { return false; } FieldType other = (FieldType) arg; return field.equals(other.field) && (parentClass == null ? other.parentClass == null : parentClass.equals(other.parentClass)); } FieldType(ConnectionSource...
FieldType { @Override public boolean equals(Object arg) { if (arg == null || arg.getClass() != this.getClass()) { return false; } FieldType other = (FieldType) arg; return field.equals(other.field) && (parentClass == null ? other.parentClass == null : parentClass.equals(other.parentClass)); } FieldType(ConnectionSource...
FieldType { @Override public boolean equals(Object arg) { if (arg == null || arg.getClass() != this.getClass()) { return false; } FieldType other = (FieldType) arg; return field.equals(other.field) && (parentClass == null ? other.parentClass == null : parentClass.equals(other.parentClass)); } FieldType(ConnectionSource...