Class ForeignField

java.lang.Object
overit.geocall.lang.ForeignField
All Implemented Interfaces:
Serializable

public class ForeignField extends Object implements Serializable
This class defines a ForeignField, the object that represents the translation of a field name
See Also:
  • Field Details

    • name

      protected String name
      String that defines the name of the ForeignField
    • translated

      protected boolean translated
      Defines if, according to what is defined in the dictionary, a translation is appropriate for output fields. If in the dictionary there is an entry like $FIELDNAME== this variables will be set to false (there is no translation for the field name but the field requires a static translation of its content, for the output).
    • translatedForEditing

      protected boolean translatedForEditing
      Defines if, according to what is defined in the dictionary, a translation is appropriate for output fields. If in the dictionary there is an entry like $FIELDNAME=- this variables will be set to false (there is no translation for the field name but the field requires a static translation of its content, even for the input).
    • position

      protected int position
      Defines the position of the field
  • Constructor Details

    • ForeignField

      public ForeignField(String name)
      Creates a ForeignField with the desired name
      Parameters:
      name - The name of the field
  • Method Details

    • getName

      public String getName()
      retrieves the name
      Returns:
      the name
    • isTranslated

      public boolean isTranslated()
      get the translated state of the field translated
      Returns:
      the translated state of the field translated
    • isTranslatedForEditing

      public boolean isTranslatedForEditing()
      get the translated state of the field translatedForEditing
      Returns:
      the translated state of the field translatedForEditing
    • getPosition

      public int getPosition()
      get the position position of the field
      Returns:
      the position position of the field
    • findPosition

      public void findPosition(Map fieldMap)
      Sets the position attribute of the ForeignField, searching it in the fields Map passed as parameter, starting from the field name. If in the map there isn't an entry with key equals to the ForeignField name, the position will be set to -1 (invalid position)
      Parameters:
      fieldMap - The Map in which search the field position
    • findPosition

      public void findPosition(DBView dbv)
      Sets the position attribute of the ForeignField, searching it in the DBView passed as parameter, starting from the field name and using the DBView.getFieldPos(java.lang.String) method. If the field does not exists in the DBView, the position will be set to -1 (invalid position)
      Parameters:
      dbv - The DBView in which search the field position
    • unknownPosition

      public boolean unknownPosition()
      Checks if the ForeignField has an unknown position
      Returns:
      true if the field has an unknown position, false otherwise
    • validPosition

      public boolean validPosition()
      Checks if the ForeignField has a valid position
      Returns:
      true if the field has a valid position, false otherwise
    • invalidPosition

      public boolean invalidPosition()
      Checks if the ForeignField has an invalid position
      Returns:
      true if the field has an invalid position, false otherwise