Class AbstractDAO
- java.lang.Object
-
- oracle.spatial.network.nfe.io.jdbc.dao.AbstractDAO
-
- Direct Known Subclasses:
FeatureDAO,ModelDAO,NetworkDAO,RuleDAO,SpatialDAO,WorkspaceDAO
public class AbstractDAO extends java.lang.ObjectA base class for data access objects (DAOs), providing methods to access the model and the connection.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.sql.Connectionconn
-
Constructor Summary
Constructors Constructor Description AbstractDAO(java.sql.Connection conn, NFEModel model)Creates an AbstractDAO with the specified connection and model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose(java.sql.ResultSet resultSet)protected voidclose(java.sql.Statement statement)protected voidexecute(java.sql.CallableStatement statement, java.lang.String sql)protected booleanexecute(java.sql.PreparedStatement statement, java.lang.String sql)protected java.sql.ResultSetexecuteQuery(java.sql.PreparedStatement statement, java.lang.String sql)protected intexecuteUpdate(java.sql.PreparedStatement statement, java.lang.String sql)java.sql.ConnectiongetConnection()Returns the connection.NFEModelgetModel()Returns the model.SQLValidatorgetSQLValidator()Returns the SQLValidator
-
-
-
Constructor Detail
-
AbstractDAO
public AbstractDAO(java.sql.Connection conn, NFEModel model)Creates an AbstractDAO with the specified connection and model.- Parameters:
conn- connectionmodel- model
-
-
Method Detail
-
getConnection
public java.sql.Connection getConnection()
Returns the connection.- Returns:
- connection
-
getModel
public NFEModel getModel()
Returns the model.- Returns:
- model
-
getSQLValidator
public SQLValidator getSQLValidator()
Returns the SQLValidator- Returns:
- sqlValidator
-
close
protected void close(java.sql.Statement statement)
-
close
protected void close(java.sql.ResultSet resultSet)
-
executeUpdate
protected int executeUpdate(java.sql.PreparedStatement statement, java.lang.String sql) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
execute
protected void execute(java.sql.CallableStatement statement, java.lang.String sql) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
execute
protected boolean execute(java.sql.PreparedStatement statement, java.lang.String sql) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
executeQuery
protected java.sql.ResultSet executeQuery(java.sql.PreparedStatement statement, java.lang.String sql) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
-