cleaned imports and added function calls to Templator
This commit is contained in:
parent
4086990c0f
commit
86f63326b6
123 changed files with 467 additions and 561 deletions
|
|
@ -22,23 +22,17 @@
|
|||
|
||||
package zutil.db;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.math.BigInteger;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import zutil.db.handler.SimpleSQLHandler;
|
||||
import zutil.log.LogUtil;
|
||||
|
||||
import javax.naming.InitialContext;
|
||||
import javax.naming.NamingException;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import zutil.db.handler.SimpleSQLHandler;
|
||||
import zutil.log.LogUtil;
|
||||
import java.io.Closeable;
|
||||
import java.math.BigInteger;
|
||||
import java.sql.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class DBConnection implements Closeable{
|
||||
private static final Logger logger = LogUtil.getLogger();
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@
|
|||
|
||||
package zutil.db;
|
||||
|
||||
import zutil.db.DBConnection.DBMS;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import zutil.db.DBConnection.DBMS;
|
||||
|
||||
/**
|
||||
* This class is an connection pool
|
||||
*
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
package zutil.db;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.sql.ResultSet;
|
||||
|
||||
public interface SQLResultHandler<T> {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
package zutil.db.bean;
|
||||
|
||||
import zutil.db.DBConnection;
|
||||
import zutil.log.LogUtil;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
|
@ -40,9 +43,6 @@ import java.util.NoSuchElementException;
|
|||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import zutil.db.DBConnection;
|
||||
import zutil.log.LogUtil;
|
||||
|
||||
/**
|
||||
* The class that extends this will be able to save its state to a database.
|
||||
* Fields that are transient will be ignored, and fields that extend
|
||||
|
|
|
|||
|
|
@ -22,25 +22,21 @@
|
|||
|
||||
package zutil.db.bean;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import zutil.db.DBConnection;
|
||||
import zutil.db.SQLResultHandler;
|
||||
import zutil.db.bean.DBBean.DBBeanConfig;
|
||||
import zutil.db.bean.DBBean.DBLinkTable;
|
||||
import zutil.log.LogUtil;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class DBBeanSQLResultHandler<T> implements SQLResultHandler<T>{
|
||||
private static final Logger logger = LogUtil.getLogger();
|
||||
/** This is the time to live for the cached items **/
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@
|
|||
|
||||
package zutil.db.handler;
|
||||
|
||||
import zutil.db.SQLResultHandler;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
|
||||
import zutil.db.SQLResultHandler;
|
||||
|
||||
/**
|
||||
* Adds the result of the query to a Properties object,
|
||||
*
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@
|
|||
|
||||
package zutil.db.handler;
|
||||
|
||||
import zutil.db.SQLResultHandler;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.sql.ResultSet;
|
||||
|
||||
import zutil.db.SQLResultHandler;
|
||||
|
||||
/**
|
||||
* Returns the first column of the first row from the query
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue