public class BasicStepField extends Object implements StepField, SizeMeasurable, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
modifiable |
| Constructor and Description |
|---|
BasicStepField(Step step,
Field f)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) static boolean |
compareSteps(Step step1,
Step step2)
Utility method, compares steps by their alias or table name.
|
(package private) static boolean |
equalFieldValues(Object value1,
Object value2)
Compares two field values for equality.
|
boolean |
equals(Object obj)
Compares this stepfield to the specified object.
|
String |
getAlias()
Gets the alias for the associated field.
|
int |
getByteSize()
Determines the byte-size of this object
|
int |
getByteSize(SizeOf sizeof)
Determines the byte-size of this object using the given SizeOf instance.
|
Field |
getField()
Gets the associated field.
|
String |
getFieldName()
Gets the name of the associated field (without prefix).
|
static String |
getFieldName(StepField field)
Returns the field's fieldname, possibly extended with the step's name if known.
|
Step |
getStep()
Gets the step associated with this fieldstep.
|
int |
getType()
Gets the type of the associated field.
|
int |
hashCode() |
BasicStepField |
setAlias(String alias)
Sets alias property.
|
void |
setUnmodifiable() |
(package private) static void |
testValue(Object value,
StepField field)
Tests if a value is acceptable for comparison with a certain field.
|
String |
toString()
Returns a string representation of this StepField.
|
public BasicStepField(Step step, Field f)
step - The associated step.field - The associated field.IllegalArgumentException - when an invalid argument is supplied.static void testValue(Object value, StepField field)
value - The value to be tested.field - The non-null field.IllegalArgumentException - when the value is not acceptable
for this field.static boolean equalFieldValues(Object value1, Object value2)
value1 - The first value, either a String
or a Numbervalue2 - The second value, either a String
or a Numberpublic void setUnmodifiable()
setUnmodifiable in interface StepFieldpublic BasicStepField setAlias(String alias)
alias - The alias property.BasicStepField instance.IllegalArgumentException - when an invalid argument is supplied.public Field getField()
public final String getFieldName()
StepFieldThis corresponds to the fieldname in SQL SELECT-syntax.
getFieldName in interface StepFieldpublic String getAlias()
StepFieldThis corresponds to the field alias in SQL SELECT-syntax.
public Step getStep()
StepFieldpublic int getType()
StepFieldField.public boolean equals(Object obj)
StepFieldtrue if and only if the argument is a non-null
StepField object associated with the same field, using the same alias.public int hashCode()
static boolean compareSteps(Step step1, Step step2)
null, the steps are considered
equal if their tablenames are equal as well.
This can be used to verify that both steps refer to the same step
in a SearchQuery object.
Note that this differs from the equality defined by their
equals() method.
step1 - The first step.step2 - The second step.true when the steps are considered equal,
false otherwise.public static String getFieldName(StepField field)
field - the fieldname whose name to returnpublic String toString()
StepFieldgetStep().getAlias() or,
when the step alias is null, the step tablename
returned by getStep().getTableName().
getFieldName()
getAlias()
public int getByteSize()
SizeMeasurablegetByteSize in interface SizeMeasurablepublic int getByteSize(SizeOf sizeof)
SizeMeasurablegetByteSize in interface SizeMeasurableMMBase 1.9-SNAPSHOT - ${javadoctimestamp}