com.github.aselab.activerecord

ActiveRecordBase

Related Doc: package activerecord

trait ActiveRecordBase[T] extends CRUDable with ActiveModel with activerecord.ActiveRecord.AssociationSupport

Source
ActiveRecord.scala
Linear Supertypes
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ActiveRecordBase
  2. AssociationSupport
  3. ActiveModel
  4. ValidationSupport
  5. JsonSerializer
  6. FormSerializer
  7. IO
  8. Validatable
  9. ProductModel
  10. Product
  11. Equals
  12. CRUDable
  13. Saveable
  14. AnyRef
  15. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean

    Definition Classes
    Equals
  2. abstract def id: T

  3. abstract def isPersisted: Boolean

  4. abstract def productArity: Int

    Definition Classes
    Product
  5. abstract def productElement(n: Int): Any

    Definition Classes
    Product

Concrete Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. lazy val _companion: ProductModelCompanion[ActiveRecordBase.this.type]

    Definition Classes
    ProductModel
  5. var _isNewRecord: Boolean

    Attributes
    protected
    Definition Classes
    CRUDable
  6. def afterCreate(): Unit

    Callback method of after create.

    Callback method of after create.

    You can override this method and implement logic if necessary. Nothing is done by default. This is not called if failed to create.

    Attributes
    protected
    Definition Classes
    CRUDable
  7. def afterDelete(): Unit

    Callback method of after delete.

    Callback method of after delete.

    You can override this method and implement logic if necessary. Nothing is done by default. This is not called if failed to delete.

    Attributes
    protected
    Definition Classes
    CRUDable
  8. def afterSave(): Unit

    Callback method of after create and update.

    Callback method of after create and update.

    You can override this method and implement logic if necessary. Nothing is done by default. This is not called if failed to save.

    Attributes
    protected
    Definition Classes
    CRUDable
  9. def afterUpdate(): Unit

    Callback method of after update.

    Callback method of after update.

    You can override this method and implement logic if necessary. Nothing is done by default. This is not called if failed to update.

    Attributes
    protected
    Definition Classes
    CRUDable
  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. def asJson(onlyFields: String*): JValue

    Definition Classes
    JsonSerializer
  12. def asJson(onlyFields: List[String]): JValue

    Definition Classes
    JsonSerializer
  13. def asJson: JValue

    Definition Classes
    JsonSerializer
  14. macro def assign(data: Map[String, Any]): ActiveRecordBase.this.type

    Definition Classes
    IO
  15. macro def assign(data: (String, Any)*): ActiveRecordBase.this.type

    Definition Classes
    IO
  16. def assignFormValues(data: Map[String, String]): ActiveRecordBase.this.type

    Definition Classes
    FormSerializer
  17. def beforeCreate(): Unit

    Callback method of before create.

    Callback method of before create.

    You can override this method and implement logic if necessary. Nothing is done by default.

    Attributes
    protected
    Definition Classes
    CRUDable
  18. def beforeDelete(): Unit

    Callback method of before delete.

    Callback method of before delete.

    You can override this method and implement logic if necessary. Nothing is done by default.

    Attributes
    protected
    Definition Classes
    CRUDable
  19. def beforeSave(): Unit

    Callback method of before create and update.

    Callback method of before create and update.

    You can override this method and implement logic if necessary. Nothing is done by default.

    Attributes
    protected
    Definition Classes
    CRUDable
  20. def beforeUpdate(): Unit

    Callback method of before update.

    Callback method of before update.

    You can override this method and implement logic if necessary. Nothing is done by default.

    Attributes
    protected
    Definition Classes
    CRUDable
  21. def beforeValidation(): Unit

    Attributes
    protected
    Definition Classes
    Validatable
  22. def belongsTo[T <: AR](foreignKey: String)(implicit m: ClassTag[T]): ActiveRecord.BelongsToAssociation[ActiveRecordBase.this.type, T]

    Attributes
    protected
    Definition Classes
    AssociationSupport
  23. def belongsTo[T <: AR](implicit m: ClassTag[T]): ActiveRecord.BelongsToAssociation[ActiveRecordBase.this.type, T]

    Attributes
    protected
    Definition Classes
    AssociationSupport
  24. def clearErrors(): Unit

    Definition Classes
    Validatable
  25. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. def create(validate: Boolean): ActiveRecordBase.this.type

  27. def create: ActiveRecordBase.this.type

  28. def delete(): Boolean

    Delete model.

    Delete model.

    before and after callbacks are available.

    Definition Classes
    CRUDable
  29. def doCreate(): Boolean

    Model creation.

    Model creation. Implement creation logic and return result of success or failure

    Attributes
    protected
    Definition Classes
    ActiveRecordBaseCRUDable
  30. def doDelete(): Boolean

    Model deletion.

    Model deletion. Implement deletion logic and return result of success or failure

    Attributes
    protected
    Definition Classes
    ActiveRecordBaseCRUDable
  31. def doUpdate(): Boolean

    Model update.

    Model update. Implement update logic and return result of success or failure

    Attributes
    protected
    Definition Classes
    ActiveRecordBaseCRUDable
  32. def doValidate(): Unit

    Definition Classes
    ValidationSupportValidatable
  33. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  34. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  35. val errors: Errors

    Definition Classes
    Validatable
  36. def fieldErrors: Seq[ValidationError]

    Definition Classes
    Validatable
  37. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  38. def formErrors: Seq[ValidationError]

    Definition Classes
    FormSerializer
  39. def fromJValue(jvalue: JValue): ActiveRecordBase.this.type

    Definition Classes
    JsonSerializer
  40. def fromJson(json: String): ActiveRecordBase.this.type

    Definition Classes
    JsonSerializer
  41. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  42. def globalErrors: Seq[ValidationError]

    Definition Classes
    Validatable
  43. def hasError(name: String): Boolean

    Definition Classes
    Validatable
  44. def hasErrors: Boolean

    Definition Classes
    Validatable
  45. def hasMany[T <: AR](conditions: Map[String, Any] = Map.empty, foreignKey: String = null)(implicit m: ClassTag[T]): ActiveRecord.HasManyAssociation[ActiveRecordBase.this.type, T]

    Attributes
    protected
    Definition Classes
    AssociationSupport
  46. def hasMany[T <: AR](implicit m: ClassTag[T]): ActiveRecord.HasManyAssociation[ActiveRecordBase.this.type, T]

    Attributes
    protected
    Definition Classes
    AssociationSupport
  47. def hasManyThrough[T <: AR, I <: AR](through: ActiveRecord.CollectionAssociation[ActiveRecordBase.this.type, I], conditions: Map[String, Any] = Map.empty, foreignKey: String = null)(implicit m1: ClassTag[T], m2: ClassTag[I]): ActiveRecord.HasManyThroughAssociation[ActiveRecordBase.this.type, T, I]

    Attributes
    protected
    Definition Classes
    AssociationSupport
  48. def hasOne[T <: AR](conditions: Map[String, Any] = Map.empty, foreignKey: String = null)(implicit m: ClassTag[T]): ActiveRecord.HasOneAssociation[ActiveRecordBase.this.type, T]

    Attributes
    protected
    Definition Classes
    AssociationSupport
  49. def hasOne[T <: AR](implicit m: ClassTag[T]): ActiveRecord.HasOneAssociation[ActiveRecordBase.this.type, T]

    Attributes
    protected
    Definition Classes
    AssociationSupport
  50. def hasOneThrough[T <: AR, I <: AR](through: ActiveRecord.SingularAssociation[ActiveRecordBase.this.type, I], conditions: Map[String, Any] = Map.empty, foreignKey: String = null)(implicit m1: ClassTag[T], m2: ClassTag[I]): ActiveRecord.HasOneThroughAssociation[ActiveRecordBase.this.type, T, I]

    Attributes
    protected
    Definition Classes
    AssociationSupport
  51. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  52. def isDeleted: Boolean

  53. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  54. def isNewRecord: Boolean

    Definition Classes
    ActiveRecordBaseActiveModelCRUDableSaveable
  55. def isValid: Boolean

    Definition Classes
    Validatable
  56. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  57. final def notify(): Unit

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

    Definition Classes
    AnyRef
  59. def productIterator: Iterator[Any]

    Definition Classes
    Product
  60. def productPrefix: String

    Definition Classes
    Product
  61. lazy val recordCompanion: ActiveRecordBaseCompanion[T, ActiveRecordBase.this.type]

    corresponding ActiveRecordCompanion object

  62. def recordInDatabase: Option[ActiveRecordBase.this.type]

  63. def save(throws: Boolean = false, validate: Boolean = true): Boolean

  64. def save(): Boolean

    Save model.

    Save model.

    If isNewRecord flag is true, it calls doCreate method. If not, it calls doUpdate method. before and after callbacks are available.

    Definition Classes
    ActiveRecordBaseValidatableCRUDableSaveable
  65. def saveEither: Either[Errors, ActiveRecordBase.this.type]

    Definition Classes
    ValidationSupport
  66. def saveWithoutValidation(): Boolean

    Definition Classes
    Validatable
  67. def serializedValue(value: Any): Any

    Attributes
    protected
    Definition Classes
    IO
  68. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  69. def toFieldType(value: Any, fieldInfo: FieldInfo): Any

    Definition Classes
    FormSerializerIO
  70. def toFormValues(prefix: Option[String]): Map[String, String]

    Definition Classes
    FormSerializer
  71. def toFormValues: Map[String, String]

    Definition Classes
    FormSerializer
  72. def toJson(onlyFields: String*): String

    Definition Classes
    JsonSerializer
  73. def toJson(onlyFields: List[String]): String

    Definition Classes
    JsonSerializer
  74. def toJson: String

    Definition Classes
    JsonSerializer
  75. def toMap: Map[String, Any]

    Definition Classes
    ActiveRecordBaseIO
  76. def toMap(onlyFields: String*): Map[String, Any]

    Definition Classes
    IO
  77. def toMap(onlyFields: List[String]): Map[String, Any]

    Definition Classes
    IO
  78. def toSerialized(map: Map[String, Any]): Map[String, Any]

    Attributes
    protected
    Definition Classes
    IO
  79. def toSerializedMap(onlyFields: List[String]): Map[String, Any]

    Definition Classes
    IO
  80. def toSerializedMap: Map[String, Any]

    Definition Classes
    IO
  81. def toString(): String

    Definition Classes
    AnyRef → Any
  82. def unsafeAssign(data: Map[String, Any]): ActiveRecordBase.this.type

    Definition Classes
    ActiveRecordBaseIO
  83. def unsafeAssign(data: Map[String, Any], assignFunc: (Any, FieldInfo) ⇒ Any): ActiveRecordBase.this.type

    Definition Classes
    IO
  84. def update(validate: Boolean): ActiveRecordBase.this.type

  85. def update: ActiveRecordBase.this.type

  86. def validate(): Boolean

    Definition Classes
    FormSerializerValidatable
  87. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ActiveModel

Inherited from ValidationSupport

Inherited from JsonSerializer

Inherited from FormSerializer

Inherited from IO

Inherited from Validatable

Inherited from ProductModel

Inherited from Product

Inherited from Equals

Inherited from CRUDable

Inherited from Saveable

Inherited from AnyRef

Inherited from Any

Ungrouped