public abstract class AbstractModel extends Object implements Serializable
A model must not be final, and should override hashCode and equals methods.
| Modifier and Type | Field and Description |
|---|---|
protected static int |
LENGTH_BIG_TEXT
Length: big text
|
protected static int |
LENGTH_LONG_TEXT
Length: long text
|
protected static int |
LENGTH_MEDIUM_TEXT
Length: medium text
|
protected static int |
LENGTH_TINY_TEXT
Length: tiny text
|
| Constructor and Description |
|---|
AbstractModel() |
| Modifier and Type | Method and Description |
|---|---|
Field |
getIdField()
Retrieve the @Id or @EmbeddedId field
|
static Field |
getIdField(Class<? extends AbstractModel> clazz)
Retrieve the @Id or @EmbeddedId field
|
Serializable |
getIdValue()
Retrieve the @Id or @EmbeddedId field value
|
protected static final int LENGTH_BIG_TEXT
protected static final int LENGTH_LONG_TEXT
protected static final int LENGTH_MEDIUM_TEXT
protected static final int LENGTH_TINY_TEXT
public final Field getIdField()
UnexpectedException - If it does not existpublic static final Field getIdField(Class<? extends AbstractModel> clazz)
clazz - the class of the modelUnexpectedException - If it does not existpublic final Serializable getIdValue()
UnexpectedException - If the field does not existCopyright © 2009-2013 IRD. All Rights Reserved.