net.liftweb.mapper

MappedForeignKey

trait MappedForeignKey[KeyType, MyOwner <: Mapper[MyOwner], Other <: KeyedMapper[KeyType, Other]] extends MappedField[KeyType, MyOwner] with LifecycleCallbacks

The Trait that defines a field that is mapped to a foreign key

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. MappedForeignKey
  2. LifecycleCallbacks
  3. MappedField
  4. Equals
  5. PSettableValueHolder
  6. PValueHolder
  7. BaseOwnedMappedField
  8. BaseMappedField
  9. Serializable
  10. Serializable
  11. MixableMappedField
  12. BaseField
  13. FieldContainer
  14. SettableField
  15. SettableValueHolder
  16. Settable
  17. ReadableField
  18. ValueHolder
  19. FieldIdentifier
  20. Bindable
  21. SelectableField
  22. TypedField
  23. AnyRef
  24. Any
Visibility
  1. Public
  2. All

Type Members

  1. abstract type FieldType <: KeyType

  2. type TheOwnerType = MyOwner

    Will be set to the type of the owner of the field

    Will be set to the type of the owner of the field

    Definition Classes
    MappedFieldMixableMappedField
  3. type ValueType = KeyType

    Will be set to the type of the field

    Will be set to the type of the field

    Definition Classes
    MappedFieldPValueHolderValueHolder

Abstract Value Members

  1. abstract def asJsExp: JsExp

    Definition Classes
    BaseMappedField
  2. abstract def asJsonValue: Box[JValue]

    Definition Classes
    BaseMappedField
  3. abstract def buildSetActualValue(accessor: Method, inst: AnyRef, columnName: String): (MyOwner, AnyRef) ⇒ Unit

    Definition Classes
    MappedField
  4. abstract def buildSetBooleanValue(accessor: Method, columnName: String): (MyOwner, Boolean, Boolean) ⇒ Unit

    Definition Classes
    MappedField
  5. abstract def buildSetDateValue(accessor: Method, columnName: String): (MyOwner, Date) ⇒ Unit

    Definition Classes
    MappedField
  6. abstract def buildSetLongValue(accessor: Method, columnName: String): (MyOwner, Long, Boolean) ⇒ Unit

    Definition Classes
    MappedField
  7. abstract def buildSetStringValue(accessor: Method, columnName: String): (MyOwner, String) ⇒ Unit

    Definition Classes
    MappedField
  8. abstract def dbFieldClass: Class[KeyType]

    What is the real class that corresponds to FieldType

    What is the real class that corresponds to FieldType

    Definition Classes
    TypedField
  9. abstract def dbKeyToTable: KeyedMetaMapper[KeyType, Other]

  10. abstract def defaultValue: KeyType

    The default value for the field

    The default value for the field

    Definition Classes
    TypedField
  11. abstract def defined_?: Boolean

    Is the key defined

  12. abstract def doneWithSave(): Unit

    Called after the field is saved to the database

    Called after the field is saved to the database

    Attributes
    protected[mapper]
    Definition Classes
    BaseMappedField
  13. abstract def fieldCreatorString(dbType: DriverType, colName: String): String

    Given the driver type, return the string required to create the column in the database

    Given the driver type, return the string required to create the column in the database

    Definition Classes
    MappedFieldBaseMappedField
  14. abstract def fieldOwner: MyOwner

    Return the owner of this field

    Return the owner of this field

    Definition Classes
    MappedField
  15. abstract def foreignMeta: KeyedMetaMapper[KeyType, Other]

    What's the MetaMapper for the foreign key

  16. abstract def i_is_!: KeyType

    The actual value of the field

    The actual value of the field

    Attributes
    protected
    Definition Classes
    MappedField
  17. abstract def i_obscure_!(in: KeyType): KeyType

    Obscure the incoming value to a "safe" value (e.

    Obscure the incoming value to a "safe" value (e.g., if there are not enough rights to view the entire social security number 123-45-5678, this method might return ***-**-*678

    Attributes
    protected
    Definition Classes
    MappedField
  18. abstract def i_was_!: KeyType

    The value of the field when it was pulled from the DB

    The value of the field when it was pulled from the DB

    Attributes
    protected
    Definition Classes
    MappedField
  19. abstract def jdbcFriendly(field: String): AnyRef

    Get a JDBC friendly representation of the named field (this is used for MappedFields that correspond to more than 1 column in the database.

    Get a JDBC friendly representation of the named field (this is used for MappedFields that correspond to more than 1 column in the database.)

    field

    -- the name of the field being mapped to

    Definition Classes
    MappedFieldBaseMappedField
  20. abstract def real_convertToJDBCFriendly(value: KeyType): AnyRef

    Attributes
    protected
    Definition Classes
    MappedField
  21. abstract def real_i_set_!(value: KeyType): KeyType

    Must be implemented to store the value of the field

    Must be implemented to store the value of the field

    Attributes
    protected
    Definition Classes
    MappedField
  22. abstract def setFromAny(value: Any): KeyType

    Attempt to figure out what the incoming value is and set the field to that value.

    Attempt to figure out what the incoming value is and set the field to that value. Return true if the value could be assigned

    Definition Classes
    MappedField
  23. abstract def targetSQLType: Int

    Get the JDBC SQL Type for this field

    Get the JDBC SQL Type for this field

    Definition Classes
    MappedFieldBaseMappedField

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def :=(v: KeyType): KeyType

    Definition Classes
    MappedField
  5. def :=[Q](v: Q)(implicit arg0: (Q) ⇒ KeyType): KeyType

    Definition Classes
    MappedField
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. final def _dbColumnNameLC: String

    The forced lower case column names

    The forced lower case column names

    Definition Classes
    BaseMappedField
  9. def _toForm: Box[Elem]

    Create an input field for the item

    Create an input field for the item

    Definition Classes
    MappedForeignKeyMappedFieldBaseMappedField
  10. def actualField(actual: MyOwner): MappedField[KeyType, MyOwner]

    Get the field that this prototypical field represents

    Get the field that this prototypical field represents

    actual

    the object to find the field on

    Definition Classes
    MappedField
  11. def afterCreate: Unit

    Definition Classes
    LifecycleCallbacks
  12. def afterDelete: Unit

    Definition Classes
    LifecycleCallbacks
  13. def afterSave: Unit

    Definition Classes
    LifecycleCallbacks
  14. def afterUpdate: Unit

    Definition Classes
    LifecycleCallbacks
  15. def afterValidation: Unit

    Definition Classes
    LifecycleCallbacks
  16. def afterValidationOnCreate: Unit

    Definition Classes
    LifecycleCallbacks
  17. def afterValidationOnUpdate: Unit

    Definition Classes
    LifecycleCallbacks
  18. def allFields: Seq[BaseField]

    Definition Classes
    BaseFieldFieldContainer
  19. def appendFieldId(in: Elem): Elem

    If the field has a defined fieldId, append it

    If the field has a defined fieldId, append it

    Attributes
    protected
    Definition Classes
    MappedField
  20. def apply(v: Other): MyOwner

    Set the value from an instance of the foreign mapper class.

    Set the value from an instance of the foreign mapper class. obj will be set to Full(v)

    returns

    the Mapper containing this field

  21. def apply(v: Box[Other]): MyOwner

    Set the value from a possible instance of the foreign mapper class.

    Set the value from a possible instance of the foreign mapper class. v will be cached in obj. If v is Empty, set the value to defaultValue (-1)

    returns

    the Mapper containing this field

  22. def apply(v: KeyType): MyOwner

    Definition Classes
    MappedField
  23. def apply[Q](v: Q)(implicit arg0: (Q) ⇒ KeyType): MyOwner

    Definition Classes
    MappedField
  24. def asHtml: Node

    Default read-only rendering of field

    Default read-only rendering of field

    Definition Classes
    MappedFieldBaseMappedFieldMixableMappedFieldReadableFieldBindable
  25. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  26. def asJs: List[(String, JsExp)]

    Definition Classes
    BaseMappedField
  27. def asJsonField: Box[JField]

    Definition Classes
    BaseMappedField
  28. def asString: String

    Return the field name and field value, delimited by an '='

    Return the field name and field value, delimited by an '='

    Definition Classes
    MappedFieldBaseMappedFieldMixableMappedField
  29. def atomicUpdate(f: (ValueType) ⇒ ValueType): ValueType

    Perform an atomic update of this Settable.

    Perform an atomic update of this Settable. The current value is passed to the function and the ValueHolder is set to the result of the function. This is enclosed in the performAtomicOperation method which will, by default, synchronize this instance

    Definition Classes
    Settable
  30. def beforeCreate: Unit

    Definition Classes
    LifecycleCallbacks
  31. def beforeDelete: Unit

    Definition Classes
    LifecycleCallbacks
  32. def beforeSave: Unit

    This method, which gets called when the mapper class is going to be saved, sets the field's value from obj if it's set to the default (!defined_?).

    This method, which gets called when the mapper class is going to be saved, sets the field's value from obj if it's set to the default (!defined_?). Overrides LifecycleCallbacks.beforeSave

    Definition Classes
    MappedForeignKeyLifecycleCallbacks
  33. def beforeUpdate: Unit

    Definition Classes
    LifecycleCallbacks
  34. def beforeValidation: Unit

    Definition Classes
    LifecycleCallbacks
  35. def beforeValidationOnCreate: Unit

    Definition Classes
    LifecycleCallbacks
  36. def beforeValidationOnUpdate: Unit

    Definition Classes
    LifecycleCallbacks
  37. def cached_?: Boolean

    Is the obj field cached

  38. def calcFieldName: String

    Definition Classes
    MappedField
  39. def canEqual(that: Any): Boolean

    Definition Classes
    MappedField → Equals
  40. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  41. final def convertToJDBCFriendly(value: KeyType): AnyRef

    Definition Classes
    MappedField
  42. def dbAddedColumn: Box[() ⇒ Unit]

    Called when a column has been added to the database via Schemifier

    Called when a column has been added to the database via Schemifier

    Definition Classes
    MappedFieldBaseMappedField
  43. def dbAddedIndex: Box[() ⇒ Unit]

    Called when a column has indexed via Schemifier

    Called when a column has indexed via Schemifier

    Definition Classes
    MappedFieldBaseMappedField
  44. def dbAutogenerated_?: Boolean

    Is the primary key autogenerated

    Is the primary key autogenerated

    Definition Classes
    BaseMappedField
  45. def dbColumnCount: Int

    The number of database columns that this field represents

    The number of database columns that this field represents

    Definition Classes
    MappedFieldBaseMappedFieldMixableMappedField
  46. def dbColumnName: String

    Definition Classes
    MappedFieldBaseMappedField
  47. def dbColumnNames(in: String): List[String]

    Definition Classes
    MappedFieldBaseMappedField
  48. def dbDisplay_?: Boolean

    Definition Classes
    BaseMappedField
  49. def dbForeignKey_?: Boolean

    Is the field a foreign key reference

    Is the field a foreign key reference

    Definition Classes
    MappedFieldBaseMappedFieldMixableMappedField
  50. def dbIgnoreSQLType_?: Boolean

    Do we ignore the targetSQLType for setObject

    Do we ignore the targetSQLType for setObject

    Definition Classes
    BaseMappedField
  51. def dbIncludeInForm_?: Boolean

    Definition Classes
    BaseMappedField
  52. def dbIndexFieldIndicatesSaved_?: Boolean

    override this method in indexed fields to indicate that the field has been saved

    override this method in indexed fields to indicate that the field has been saved

    Definition Classes
    MappedField
  53. def dbIndexed_?: Boolean

    Should the field be indexed?

    Should the field be indexed?

    Definition Classes
    MappedFieldBaseMappedFieldMixableMappedField
  54. def dbNotNull_?: Boolean

    Set to true if the field should be created as NOT NULL

    Set to true if the field should be created as NOT NULL

    Definition Classes
    MappedFieldBaseMappedFieldMixableMappedField
  55. def dbPrimaryKey_?: Boolean

    Is the field the table's primary key

    Is the field the table's primary key

    Definition Classes
    MappedFieldBaseMappedFieldMixableMappedField
  56. def dbSelectString: String

    Definition Classes
    MappedFieldSelectableField
  57. def dirty_?(b: Boolean): Unit

    Make the field dirty

    Make the field dirty

    Attributes
    protected
    Definition Classes
    MappedForeignKeyMappedField
  58. def dirty_?: Boolean

    Is the field dirty (has it been changed since the record was loaded from the database

    Is the field dirty (has it been changed since the record was loaded from the database

    Definition Classes
    MappedField
  59. def displayHtml: NodeSeq

    Definition Classes
    ReadableField
  60. def displayName: String

    The display name of this field (e.

    The display name of this field (e.g., "First Name")

    Definition Classes
    MappedFieldReadableField
  61. def displayNameHtml: Box[NodeSeq]

    Definition Classes
    ReadableField
  62. def doField(inst: MyOwner, meth: Method, func: PartialFunction[MappedField[KeyType, MyOwner], Unit]): Unit

    Attributes
    protected
    Definition Classes
    MappedField
  63. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  64. def equals(other: Any): Boolean

    Does the "right thing" comparing mapped fields

    Does the "right thing" comparing mapped fields

    Definition Classes
    MappedForeignKeyMappedField → Equals → AnyRef → Any
  65. def fieldCreatorString(dbType: DriverType): List[String]

    Given the driver type, return a list of SQL creation strings for the columns represented by this field

    Given the driver type, return a list of SQL creation strings for the columns represented by this field

    Definition Classes
    MappedFieldBaseMappedField
  66. def fieldId: Option[NodeSeq]

    A unique 'id' for the field for form generation

    A unique 'id' for the field for form generation

    Definition Classes
    SettableField
  67. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  68. def foreign: Box[Other]

    Some people prefer the name foreign to materialize the foreign reference.

    Some people prefer the name foreign to materialize the foreign reference. This is a proxy to the obj method.

  69. def formElemAttrs: Seq[ElemAttr]

    What form elements are we going to add to this field?

    What form elements are we going to add to this field?

    Definition Classes
    BaseMappedField
  70. def formInputType: String

    When building the form field, what's the input element's type attribute.

    When building the form field, what's the input element's type attribute. Defaults to 'text', but change to 'email' or other HTML5 values.

    Attributes
    protected
    Definition Classes
    MappedField
  71. def get: KeyType

    An alternative getter

    An alternative getter

    Definition Classes
    MappedFieldValueHolder
  72. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  73. def getField(inst: MyOwner, meth: Method): MappedField[KeyType, MyOwner]

    Attributes
    protected
    Definition Classes
    MappedField
  74. def hashCode(): Int

    Definition Classes
    MappedField → AnyRef → Any
  75. def helpAsHtml: Box[NodeSeq]

    Definition Classes
    SettableField
  76. final def i_set_!(value: KeyType): KeyType

    Attributes
    protected
    Definition Classes
    MappedField
  77. def ignoreField_?: Boolean

    Should the field be ignored by the OR Mapper?

    Should the field be ignored by the OR Mapper?

    Definition Classes
    MappedField
  78. def immutableMsg: NodeSeq

  79. def is: KeyType

    Convert the field to its "context free" type (e.

    Convert the field to its "context free" type (e.g., String, Int, Long, etc.) If there are no read permissions, the value will be obscured

    Definition Classes
    MappedFieldValueHolder
  80. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  81. def jdbcFriendly: AnyRef

    Get a JDBC friendly object for the part of this field that maps to the first column in the database

    Get a JDBC friendly object for the part of this field that maps to the first column in the database

    Definition Classes
    MappedFieldBaseMappedField
  82. final def name: String

    The name of this field

    The name of this field

    Definition Classes
    MappedFieldReadableField
  83. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  84. def notNullAppender(): String

    Definition Classes
    MappedField
  85. final def notify(): Unit

    Definition Classes
    AnyRef
  86. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  87. def obj: Box[Other]

    Load and cache the record that this field references

  88. def performAtomicOperation[T](f: ⇒ T): T

    Perform an atomic operation on the Settable.

    Perform an atomic operation on the Settable. By default synchronizes the instance, but it could use other mechanisms

    Definition Classes
    Settable
  89. def primeObj(obj: Box[Other]): Unit

    Prime the reference of this FK reference

  90. def readPermission_?: Boolean

    Given the current execution state, can the field be read?

    Given the current execution state, can the field be read?

    Definition Classes
    MappedField
  91. def renderJs_?: Boolean

    Definition Classes
    BaseMappedField
  92. def required_?: Boolean

    Is the Field required (and will have a style designating it as such)

    Is the Field required (and will have a style designating it as such)

    Definition Classes
    SettableField
  93. def resetDirty: Unit

    Definition Classes
    MappedField
  94. def runFilters(in: KeyType, filter: List[(KeyType) ⇒ KeyType]): KeyType

    Definition Classes
    MappedField
  95. final def safe_?: Boolean

    Are we in "safe" mode (i.

    Are we in "safe" mode (i.e., the value of the field can be read or written without any security checks.)

    Definition Classes
    MappedField
  96. def set(value: KeyType): KeyType

    Set the field to the value

    Set the field to the value

    Definition Classes
    MappedFieldSettable
  97. def setFilter: List[(KeyType) ⇒ KeyType]

    A list of functions that transform the value before it is set.

    A list of functions that transform the value before it is set. The transformations are also applied before the value is used in a query. Typical applications of this are trimming and/or toLowerCase-ing strings

    Definition Classes
    MappedFieldSettableField
  98. def set_?(value: Box[KeyType]): Box[KeyType]

    Set the field to the Box value if the Box is Full

    Set the field to the Box value if the Box is Full

    Definition Classes
    MappedField
  99. def shouldDisplay_?: Boolean

    Given the current context, should this field be displayed

    Given the current context, should this field be displayed

    Definition Classes
    ReadableField
  100. def show_?: Boolean

    Given the current state of things, should this field be shown

    Given the current state of things, should this field be shown

    Definition Classes
    SettableField
  101. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  102. def targetSQLType(field: String): Int

    Get the JDBC SQL Type for this field

    Get the JDBC SQL Type for this field

    Definition Classes
    MappedFieldBaseMappedField
  103. def toForm: Box[NodeSeq]

    Create an input field for the item

    Create an input field for the item

    Definition Classes
    MappedFieldSettableField
  104. def toFormAppendedAttributes: MetaData

    Definition Classes
    MappedField
  105. def toString(): String

    Definition Classes
    MappedField → AnyRef → Any
  106. def uniqueFieldId: Box[String]

    The unique field id is the field name and the mapper name

    The unique field id is the field name and the mapper name

    Definition Classes
    MappedFieldFieldIdentifier
  107. def update[Q](v: Q)(implicit arg0: (Q) ⇒ KeyType): Unit

    Assignment from the underlying type.

    Assignment from the underlying type. It's ugly, but:
    field() = new_value
    field set new_value
    field.set(new_value)
    are all the same

    Definition Classes
    MappedField
  108. def uploadField_?: Boolean

    Is this an upload field so that a form that includes this field must be multi-part mime

    Is this an upload field so that a form that includes this field must be multi-part mime

    Definition Classes
    SettableField
  109. val valHasObj: (Long) ⇒ List[FieldError]

    A validation function that checks that obj is nonempty

  110. def validSelectValues: Box[List[(KeyType, String)]]

  111. def validate: List[FieldError]

    Validate this field and return a list of Validation Issues

    Validate this field and return a list of Validation Issues

    Definition Classes
    MappedFieldSettableField
  112. def validations: List[(KeyType) ⇒ List[FieldError]]

    Definition Classes
    MappedFieldSettableField
  113. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  114. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  115. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  116. def was: KeyType

    What value was the field's value when it was pulled from the DB?

    What value was the field's value when it was pulled from the DB?

    Definition Classes
    MappedField
  117. def writePermission_?: Boolean

    Given the current execution state, can the field be written?

    Given the current execution state, can the field be written?

    Definition Classes
    MappedField

Inherited from LifecycleCallbacks

Inherited from MappedField[KeyType, MyOwner]

Inherited from Equals

Inherited from PSettableValueHolder[KeyType]

Inherited from PValueHolder[KeyType]

Inherited from BaseOwnedMappedField[MyOwner]

Inherited from BaseMappedField

Inherited from Serializable

Inherited from Serializable

Inherited from MixableMappedField

Inherited from BaseField

Inherited from FieldContainer

Inherited from SettableField

Inherited from SettableValueHolder

Inherited from Settable

Inherited from ReadableField

Inherited from ValueHolder

Inherited from FieldIdentifier

Inherited from Bindable

Inherited from SelectableField

Inherited from TypedField[KeyType]

Inherited from AnyRef

Inherited from Any