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.Object
A 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.Connection
conn
-
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 void
close(java.sql.ResultSet resultSet)
protected void
close(java.sql.Statement statement)
protected void
execute(java.sql.CallableStatement statement, java.lang.String sql)
protected boolean
execute(java.sql.PreparedStatement statement, java.lang.String sql)
protected java.sql.ResultSet
executeQuery(java.sql.PreparedStatement statement, java.lang.String sql)
protected int
executeUpdate(java.sql.PreparedStatement statement, java.lang.String sql)
java.sql.Connection
getConnection()
Returns the connection.NFEModel
getModel()
Returns the model.SQLValidator
getSQLValidator()
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
-
-