abstract class MappedDecimal[T <: Mapper[T]] extends MappedField[BigDecimal, T]
A field that maps to a decimal value. Decimal precision and rounding are controlled via the context parameter. The default value is zero.
Note:
Using MathContext.UNLIMITED, whether explicitly or implicitly, means
that no precision or scaling will be used for the SQL field definition; the
default scale for DECIMAL is zero per the SQL standard, but the precision
for DECIMAL is vendor-specific. For example, PostgreSQL uses maximum precision
if it's not specified, but SQL Server uses a default precision of 18.
- Alphabetic
- By Inheritance
- MappedDecimal
- MappedField
- Equals
- PSettableValueHolder
- PValueHolder
- BaseOwnedMappedField
- BaseMappedField
- Serializable
- Serializable
- MixableMappedField
- BaseField
- FieldContainer
- SettableField
- SettableValueHolder
- Settable
- ReadableField
- ValueHolder
- FieldIdentifier
- Bindable
- SelectableField
- TypedField
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
MappedDecimal(fieldOwner: T, value: BigDecimal)
Constructs a MappedDecimal with the specified initial value.
Constructs a MappedDecimal with the specified initial value. The context is set to MathContext.UNLIMITED (see note above about default precision). The scale is taken from the initial value.
- fieldOwner
The Mapper that owns this field
- value
The initial value
-
new
MappedDecimal(fieldOwner: T, value: BigDecimal, context: MathContext)
Constructs a MappedDecimal with the specified initial value and context.
Constructs a MappedDecimal with the specified initial value and context. The scale is taken from the initial value.
- fieldOwner
The Mapper that owns this field
- value
The initial value
- context
The MathContext that controls precision and rounding
-
new
MappedDecimal(fieldOwner: T, context: MathContext, scale: Int)
- fieldOwner
The Mapper that owns this field
- context
The MathContext that controls precision and rounding
- scale
Controls the scale of the underlying BigDecimal
Type Members
-
type
TheOwnerType = T
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
- MappedField → MixableMappedField
-
type
ValueType = BigDecimal
Will be set to the type of the field
Will be set to the type of the field
- Definition Classes
- MappedField → PValueHolder → ValueHolder
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
:=(v: BigDecimal): BigDecimal
- Definition Classes
- MappedField
-
def
:=[Q](v: Q)(implicit arg0: (Q) ⇒ BigDecimal): BigDecimal
- Definition Classes
- MappedField
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
_dbColumnNameLC: String
The forced lower case column names
The forced lower case column names
- Definition Classes
- BaseMappedField
-
def
_toForm: Box[NodeSeq]
Create an input field for the item
Create an input field for the item
- Definition Classes
- MappedField → BaseMappedField
-
def
actualField(actual: T): MappedField[BigDecimal, T]
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
-
def
allFields: Seq[BaseField]
- Definition Classes
- BaseField → FieldContainer
-
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
-
def
apply(v: BigDecimal): T
- Definition Classes
- MappedField
-
def
apply[Q](v: Q)(implicit arg0: (Q) ⇒ BigDecimal): T
- Definition Classes
- MappedField
-
def
asHtml: Node
Default read-only rendering of field
Default read-only rendering of field
- Definition Classes
- MappedField → BaseMappedField → MixableMappedField → ReadableField → Bindable
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asJs: List[(String, JsExp)]
- Definition Classes
- BaseMappedField
-
def
asJsExp: JsExp
- Definition Classes
- MappedDecimal → BaseMappedField
-
def
asJsonField: Box[JField]
- Definition Classes
- BaseMappedField
-
def
asJsonValue: Box[JValue]
- Definition Classes
- MappedDecimal → BaseMappedField
-
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
- MappedField → BaseMappedField → MixableMappedField
-
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
-
def
buildSetActualValue(accessor: Method, data: AnyRef, columnName: String): (T, AnyRef) ⇒ Unit
- Definition Classes
- MappedDecimal → MappedField
-
def
buildSetBooleanValue(accessor: Method, columnName: String): (T, Boolean, Boolean) ⇒ Unit
- Definition Classes
- MappedDecimal → MappedField
-
def
buildSetDateValue(accessor: Method, columnName: String): (T, Date) ⇒ Unit
- Definition Classes
- MappedDecimal → MappedField
-
def
buildSetLongValue(accessor: Method, columnName: String): (T, Long, Boolean) ⇒ Unit
- Definition Classes
- MappedDecimal → MappedField
-
def
buildSetStringValue(accessor: Method, columnName: String): (T, String) ⇒ Unit
- Definition Classes
- MappedDecimal → MappedField
-
def
calcFieldName: String
- Definition Classes
- MappedField
-
def
canEqual(that: Any): Boolean
- Definition Classes
- MappedField → Equals
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
coerce(in: BigDecimal): BigDecimal
- Attributes
- protected
- val context: MathContext
-
final
def
convertToJDBCFriendly(value: BigDecimal): AnyRef
- Definition Classes
- MappedField
-
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
- MappedField → BaseMappedField
-
def
dbAddedIndex: Box[() ⇒ Unit]
Called when a column has indexed via Schemifier
Called when a column has indexed via Schemifier
- Definition Classes
- MappedField → BaseMappedField
-
def
dbAutogenerated_?: Boolean
Is the primary key autogenerated
Is the primary key autogenerated
- Definition Classes
- BaseMappedField
-
def
dbColumnCount: Int
The number of database columns that this field represents
The number of database columns that this field represents
- Definition Classes
- MappedField → BaseMappedField → MixableMappedField
-
def
dbColumnName: String
- Definition Classes
- MappedField → BaseMappedField
-
def
dbColumnNames(in: String): List[String]
- Definition Classes
- MappedField → BaseMappedField
-
def
dbDisplay_?: Boolean
- Definition Classes
- BaseMappedField
-
def
dbFieldClass: Class[BigDecimal]
What is the real class that corresponds to FieldType
What is the real class that corresponds to FieldType
- Definition Classes
- MappedDecimal → TypedField
-
def
dbForeignKey_?: Boolean
Is the field a foreign key reference
Is the field a foreign key reference
- Definition Classes
- MappedField → BaseMappedField → MixableMappedField
-
def
dbIgnoreSQLType_?: Boolean
Do we ignore the targetSQLType for setObject
Do we ignore the targetSQLType for setObject
- Definition Classes
- BaseMappedField
-
def
dbIncludeInForm_?: Boolean
- Definition Classes
- BaseMappedField
-
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
-
def
dbIndexed_?: Boolean
Should the field be indexed?
Should the field be indexed?
- Definition Classes
- MappedField → BaseMappedField → MixableMappedField
-
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
- MappedField → BaseMappedField → MixableMappedField
-
def
dbPrimaryKey_?: Boolean
Is the field the table's primary key
Is the field the table's primary key
- Definition Classes
- MappedField → BaseMappedField → MixableMappedField
-
def
dbSelectString: String
- Definition Classes
- MappedField → SelectableField
-
def
defaultValue: BigDecimal
The default value for the field
The default value for the field
- Definition Classes
- MappedDecimal → TypedField
-
def
dirty_?(b: Boolean): Unit
Make the field dirty
Make the field dirty
- Attributes
- protected
- Definition Classes
- MappedField
-
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
-
def
displayHtml: NodeSeq
- Definition Classes
- ReadableField
-
def
displayName: String
The display name of this field (e.g., "First Name")
The display name of this field (e.g., "First Name")
- Definition Classes
- MappedField → ReadableField
-
def
displayNameHtml: Box[NodeSeq]
- Definition Classes
- ReadableField
-
def
doField(inst: T, meth: Method, func: PartialFunction[MappedField[BigDecimal, T], Unit]): Unit
- Attributes
- protected
- Definition Classes
- MappedField
-
def
doneWithSave(): Unit
Called after the field is saved to the database
Called after the field is saved to the database
- Definition Classes
- MappedDecimal → BaseMappedField
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(other: Any): Boolean
Does the "right thing" comparing mapped fields
Does the "right thing" comparing mapped fields
- Definition Classes
- MappedField → Equals → AnyRef → Any
-
def
fieldCreatorString(dbType: DriverType, colName: String): String
Returns the SQL creation string for this field.
Returns the SQL creation string for this field. See the note at the top of the page concerning default precision.
- Definition Classes
- MappedDecimal → MappedField → BaseMappedField
-
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
- MappedField → BaseMappedField
-
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
-
val
fieldOwner: T
- Definition Classes
- MappedDecimal → MappedField
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formElemAttrs: Seq[http.SHtml.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
-
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
-
def
get: BigDecimal
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
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
- MappedField → ValueHolder
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getField(inst: T, meth: Method): MappedField[BigDecimal, T]
- Attributes
- protected
- Definition Classes
- MappedField
-
def
hashCode(): Int
- Definition Classes
- MappedField → AnyRef → Any
-
def
helpAsHtml: Box[NodeSeq]
- Definition Classes
- SettableField
-
def
i_is_!: BigDecimal
The actual value of the field
The actual value of the field
- Attributes
- protected
- Definition Classes
- MappedDecimal → MappedField
-
def
i_obscure_!(in: BigDecimal): BigDecimal
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
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
- MappedDecimal → MappedField
-
final
def
i_set_!(value: BigDecimal): BigDecimal
- Attributes
- protected
- Definition Classes
- MappedField
-
def
i_was_!: BigDecimal
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
- MappedDecimal → MappedField
-
def
ignoreField_?: Boolean
Should the field be ignored by the OR Mapper?
Should the field be ignored by the OR Mapper?
- Definition Classes
- MappedField
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
jdbcFriendly(field: String): BigDecimal
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
- MappedDecimal → MappedField → BaseMappedField
-
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
- MappedField → BaseMappedField
-
def
manifest: scala.reflect.api.JavaUniverse.TypeTag[BigDecimal]
- Definition Classes
- MappedDecimal → MappedField
-
final
def
name: String
The name of this field
The name of this field
- Definition Classes
- MappedField → ReadableField
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
notNullAppender(): String
- Definition Classes
- MappedField
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
-
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
- MappedDecimal → MappedField
-
def
real_convertToJDBCFriendly(value: BigDecimal): AnyRef
- Definition Classes
- MappedDecimal → MappedField
-
def
real_i_set_!(value: BigDecimal): BigDecimal
Must be implemented to store the value of the field
Must be implemented to store the value of the field
- Attributes
- protected
- Definition Classes
- MappedDecimal → MappedField
-
def
renderJs_?: Boolean
- Definition Classes
- BaseMappedField
-
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
-
def
resetDirty: Unit
- Definition Classes
- MappedField
-
def
runFilters(in: BigDecimal, filter: List[(BigDecimal) ⇒ BigDecimal]): BigDecimal
- Definition Classes
- MappedField
-
final
def
safe_?: Boolean
Are we in "safe" mode (i.e., the value of the field can be read or written without any security checks.)
Are we in "safe" mode (i.e., the value of the field can be read or written without any security checks.)
- Definition Classes
- MappedField
- val scale: Int
-
def
set(value: BigDecimal): BigDecimal
Set the field to the value
Set the field to the value
- Definition Classes
- MappedField → Settable
-
def
setAll(in: BigDecimal): BigDecimal
Set the value along with proper scale, precision, and rounding
Set the value along with proper scale, precision, and rounding
- Attributes
- protected
-
def
setFilter: List[(BigDecimal) ⇒ BigDecimal]
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
- MappedField → SettableField
-
def
setFromAny(in: Any): BigDecimal
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
- MappedDecimal → MappedField
- def setFromString(in: String): BigDecimal
-
def
set_?(value: Box[BigDecimal]): Box[BigDecimal]
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
-
def
shouldDisplay_?: Boolean
Given the current context, should this field be displayed
Given the current context, should this field be displayed
- Definition Classes
- ReadableField
-
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
-
def
sourceFieldInfo(): SourceFieldInfo { type T = BigDecimal }
- Definition Classes
- MappedField
-
def
sourceInfoMetadata(): SourceFieldMetadata { type ST = BigDecimal }
Get the source field metadata for the field
Get the source field metadata for the field
- returns
the source field metadata for the field
- Definition Classes
- MappedDecimal → MappedField
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
targetSQLType: Int
Get the JDBC SQL Type for this field
Get the JDBC SQL Type for this field
- Definition Classes
- MappedDecimal → MappedField → BaseMappedField
-
def
targetSQLType(field: String): Int
Get the JDBC SQL Type for this field
Get the JDBC SQL Type for this field
- Definition Classes
- MappedField → BaseMappedField
-
def
toForm: Box[NodeSeq]
Create an input field for the item
Create an input field for the item
- Definition Classes
- MappedField → SettableField
-
def
toFormAppendedAttributes: MetaData
- Definition Classes
- MappedField
-
def
toString(): String
- Definition Classes
- MappedField → AnyRef → Any
-
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
- MappedField → FieldIdentifier
-
def
update[Q](v: Q)(implicit arg0: (Q) ⇒ BigDecimal): 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
-
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
-
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
- MappedField → SettableField
-
def
validations: List[(BigDecimal) ⇒ List[FieldError]]
- Definition Classes
- MappedField → SettableField
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
was: BigDecimal
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
-
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
- MappedDecimal → MappedField