Package overit.geocall.da
Class Command
java.lang.Object
overit.geocall.da.Command
- All Implemented Interfaces:
Serializable
Class used to define a custom command to be used within a
DAO.
It is defined by indicating a name, a Command.Type and defining if it
is a command that operates on the basis of the primary key.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines the possible values for the type of command: INSERT, UPDATE, DELETE, SELECT -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCommand(String name, Command.Type t, boolean forPk) Creates a new Command instance -
Method Summary
-
Field Details
-
_name
-
_type
-
_forPk
protected boolean _forPk
-
-
Constructor Details
-
Command
Creates a new Command instance- Parameters:
name- The string that represents the name of the commandt- The type of the command, one of the elements of the enumerationCommand.TypeforPk- boolean that determines if the command is a command that works on the primary key
-
-
Method Details
-
getType
Returns the type of this command- Returns:
- One of the elements of the enumeration
Command.Type
-
getName
Returns the name of this command- Returns:
- The string that represents the name
-
isForPk
public boolean isForPk()Check if the command is a command that works on the primary key- Returns:
trueif the command is a command that works on the primary key,falseotherwise
-
toString
Returns the name of this command
-