|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.storage.search.implementation.BasicStepField
public class BasicStepField
Basic implementation. The field alias is not set on default.
| Field Summary | |
|---|---|
protected boolean |
modifiable
|
| Constructor Summary | |
|---|---|
BasicStepField(Step step,
Field f)
Constructor. |
|
| Method Summary | |
|---|---|
(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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean modifiable
| Constructor Detail |
|---|
public BasicStepField(Step step,
Field f)
step - The associated step.field - The associated field.
IllegalArgumentException - when an invalid argument is supplied.| Method Detail |
|---|
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 Number
public 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.
getAlias in interface StepFieldpublic Step getStep()
StepField
getStep in interface StepFieldpublic int getType()
StepFieldField.
getType in interface StepFieldpublic 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.
equals in interface StepFieldequals in class Objectobj - The object to compare with.
true if the objects are equal,
false otherwise.public int hashCode()
hashCode in interface StepFieldhashCode in class Object
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()
toString in interface StepFieldtoString in class Objectpublic int getByteSize()
SizeMeasurable
getByteSize in interface SizeMeasurablepublic int getByteSize(SizeOf sizeof)
SizeMeasurable
getByteSize in interface SizeMeasurable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||