Trait

com.github.aselab.activerecord

ActiveRecordBase

Related Doc: package activerecord

Permalink

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

Source
ActiveRecord.scala
Linear Supertypes
Known Subclasses
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
Visibility
  1. Public
  2. All

Abstract Value Members

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

    Permalink
    Definition Classes
    Equals
  2. abstract def id: T

    Permalink
  3. abstract def isPersisted: Boolean

    Permalink
  4. abstract def productArity: Int

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

    Permalink
    Definition Classes
    Product

Concrete Value Members

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

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

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

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

    Permalink
    Definition Classes
    ProductModel
  5. var _isNewRecord: Boolean

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

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

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

    Permalink
    Definition Classes
    JsonSerializer
  13. def asJson: JValue

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

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

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

    Permalink
    Definition Classes
    FormSerializer
  17. def beforeCreate(): Unit

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

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

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

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

    Permalink
    Definition Classes
    Validatable
  25. def clone(): AnyRef

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

    Permalink
  27. def create: ActiveRecordBase.this.type

    Permalink
  28. def delete(): Boolean

    Permalink

    Delete model.

    Delete model.

    before and after callbacks are available.

    Definition Classes
    CRUDable
  29. def doCreate(): Boolean

    Permalink

    Model creation.

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

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

    Permalink

    Model deletion.

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

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

    Permalink

    Model update.

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  35. val errors: Errors

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

    Permalink
    Definition Classes
    Validatable
  37. def formErrors: Seq[ValidationError]

    Permalink
    Definition Classes
    FormSerializer
  38. def fromJValue(jvalue: JValue, throws: Boolean = false): ActiveRecordBase.this.type

    Permalink
    Definition Classes
    JsonSerializer
  39. def fromJson(json: String, throws: Boolean = false): ActiveRecordBase.this.type

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

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  41. def globalErrors: Seq[ValidationError]

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

    Permalink
    Definition Classes
    Validatable
  43. def hasErrors: Boolean

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    AssociationSupport
  46. 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]

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    AssociationSupport
  49. 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]

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

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  51. def isDeleted: Boolean

    Permalink
  52. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  53. def isNewRecord: Boolean

    Permalink
    Definition Classes
    ActiveRecordBaseActiveModelCRUDableSaveable
  54. def isValid: Boolean

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

    Permalink
    Definition Classes
    AnyRef
  56. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  57. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  58. def productIterator: Iterator[Any]

    Permalink
    Definition Classes
    Product
  59. def productPrefix: String

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

    Permalink

    corresponding ActiveRecordCompanion object

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

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

    Permalink
  63. def save(): Boolean

    Permalink

    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
  64. def saveEither: Either[Errors, ActiveRecordBase.this.type]

    Permalink
    Definition Classes
    ValidationSupport
  65. def saveWithoutValidation(): Boolean

    Permalink
    Definition Classes
    Validatable
  66. def serializedValue(value: Any): Any

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

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

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

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

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

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

    Permalink
    Definition Classes
    JsonSerializer
  73. def toJson: String

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

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

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

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

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

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

    Permalink
    Definition Classes
    IO
  80. def toString(): String

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

    Permalink
    Definition Classes
    ActiveRecordBaseIO
  82. def unsafeAssign(data: Map[String, Any], assignFunc: (Any, FieldInfo) ⇒ Any, throws: Boolean = true): ActiveRecordBase.this.type

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

    Permalink
  84. def update: ActiveRecordBase.this.type

    Permalink
  85. def validate(): Boolean

    Permalink
    Definition Classes
    FormSerializerValidatable
  86. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  88. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

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