Package net.sourceforge.jtds.jdbc
Class ProcEntry
java.lang.Object
net.sourceforge.jtds.jdbc.ProcEntry
Stores information about a cached stored procedure or statement handle.
- Version:
- $Id: ProcEntry.java,v 1.1 2005-05-25 09:24:03 alin_sinpalean Exp $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ColInfo[]
Column meta data (Sybase only).static final int
The entry references a prepared cursor handle.private String
Stored procedure name or statement handle.private ParamInfo[]
Parameter meta data (Sybase only).static final int
The entry references a failed prepare.static final int
The entry references a prepared statement handle.static final int
The entry references a stored procedure.private int
Usage count for this statement.private int
Type of statement referenced by this entry. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRef()
Increments the usage count.void
Retrieves the SQL to drop this statement.ColInfo[]
Retrieves the column meta data array.Retrieves the parameter meta data array.int
Retreives the usage count.int
getType()
Retrieves the statement implementation type.void
release()
Decrements the usage count.void
setColMetaData
(ColInfo[] colMetaData) Sets the column meta data.void
setHandle
(int handle) Sets the prepared statement handle.void
Sets the procedure name.void
setParamMetaData
(ParamInfo[] paramMetaData) Sets the parameter meta data.void
setType
(int type) Sets the statement implementation type.final String
toString()
Retrieves the procedure or handle name.
-
Field Details
-
PROCEDURE
public static final int PROCEDUREThe entry references a stored procedure.- See Also:
-
PREPARE
public static final int PREPAREThe entry references a prepared statement handle.- See Also:
-
CURSOR
public static final int CURSORThe entry references a prepared cursor handle.- See Also:
-
PREP_FAILED
public static final int PREP_FAILEDThe entry references a failed prepare.- See Also:
-
name
Stored procedure name or statement handle. -
colMetaData
Column meta data (Sybase only). -
paramMetaData
Parameter meta data (Sybase only). -
type
private int typeType of statement referenced by this entry. -
refCount
private int refCountUsage count for this statement.
-
-
Constructor Details
-
ProcEntry
public ProcEntry()
-
-
Method Details
-
toString
Retrieves the procedure or handle name. -
setName
Sets the procedure name.- Parameters:
name
- the procedure name
-
setHandle
public void setHandle(int handle) Sets the prepared statement handle.- Parameters:
handle
- thesp_prepare
handle value
-
getColMetaData
Retrieves the column meta data array.- Returns:
- the column meta data as
ColInfo[]
-
setColMetaData
Sets the column meta data.- Parameters:
colMetaData
- the column meta data
-
getParamMetaData
Retrieves the parameter meta data array.- Returns:
- the parameter meta data as a
ParamInfo[]
-
setParamMetaData
Sets the parameter meta data.- Parameters:
paramMetaData
- the parameter meta data array
-
setType
public void setType(int type) Sets the statement implementation type.- Parameters:
type
- the type code (one of PROCEDURE,PREPARE,CURSOR)
-
getType
public int getType()Retrieves the statement implementation type.- Returns:
- the statement type as an
int
-
appendDropSQL
Retrieves the SQL to drop this statement. -
addRef
public void addRef()Increments the usage count. -
release
public void release()Decrements the usage count. -
getRefCount
public int getRefCount()Retreives the usage count.- Returns:
- the usage count as an
int
-