public abstract class AbstractApplicationFormUIModel<E,B extends AbstractApplicationFormUIModel<E,B>> extends org.jdesktop.beans.AbstractSerializableBean implements JavaBeanObject
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractApplicationFormUIModel.ModifyPropertyChangeListener |
| Modifier and Type | Field and Description |
|---|---|
static com.google.common.collect.ImmutableSet<String> |
MODIFY_IGNORE_PROPERTIES |
static String |
PROPERTY_CREATE |
static String |
PROPERTY_MODIFY |
static String |
PROPERTY_VALID |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractApplicationFormUIModel() |
protected |
AbstractApplicationFormUIModel(org.nuiton.util.beans.Binder<E,B> fromBeanBinder,
org.nuiton.util.beans.Binder<B,E> toBeanBinder) |
protected |
AbstractApplicationFormUIModel(Class<E> entityType,
Class<B> uiModelType) |
| Modifier and Type | Method and Description |
|---|---|
protected static <E,B extends AbstractApplicationFormUIModel<E,B>> |
entityToModel(Class<B> modelType) |
void |
firePropertyChanged(String propertyName,
Object oldValue,
Object newValue) |
void |
fromBean(E bean) |
void |
fromEntity(E entity)
Method to override the copy of incoming entity into the form.
|
protected Set<String> |
getModifyIgnorePropertyNames() |
boolean |
isCreate() |
boolean |
isModify() |
boolean |
isValid() |
protected <B extends JavaBeanObject> |
listenAndModifyModel(Iterable<B> javaBeanObjects) |
<B extends JavaBeanObject> |
listenModelIsModify(B... javaBeanObjects) |
protected static <E,B extends AbstractApplicationFormUIModel<E,B>> |
modelToEntity() |
protected abstract E |
newEntity()
Used to copy the form to outside world.
|
void |
setCreate(boolean create) |
void |
setModify(boolean modify) |
void |
setValid(boolean valid) |
E |
toBean() |
E |
toBean(E bean) |
E |
toEntity()
Note: the method is
final, if you need to customize something, do it in the
toEntity(Object) method. |
void |
toEntity(E entity)
Method to override the copy of the form to outside world (
entity). |
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListenerequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerpublic static final String PROPERTY_MODIFY
public static final String PROPERTY_VALID
public static final String PROPERTY_CREATE
public static final com.google.common.collect.ImmutableSet<String> MODIFY_IGNORE_PROPERTIES
protected AbstractApplicationFormUIModel()
protected AbstractApplicationFormUIModel(Class<E> entityType, Class<B> uiModelType)
protected abstract E newEntity()
public void fromEntity(E entity)
fromBean(Object).entity - incoming entity to copy inside the formpublic void toEntity(E entity)
entity).
By default, invoke the simple binder copy (method toBean(Object).entity - the outside world object to fillpublic final E toEntity()
final, if you need to customize something, do it in the
toEntity(Object) method.public final void fromBean(E bean)
bean - object to copy into form using the fromBeanBinder binderpublic final E toBean()
public final E toBean(E bean)
bean - the bean to bindresultpublic boolean isModify()
public void setModify(boolean modify)
public boolean isValid()
public void setValid(boolean valid)
public boolean isCreate()
public void setCreate(boolean create)
protected Set<String> getModifyIgnorePropertyNames()
public void firePropertyChanged(String propertyName, Object oldValue, Object newValue)
firePropertyChanged in interface JavaBeanObjectpublic final <B extends JavaBeanObject> void listenModelIsModify(B... javaBeanObjects)
protected <B extends JavaBeanObject> void listenAndModifyModel(Iterable<B> javaBeanObjects)
protected static <E,B extends AbstractApplicationFormUIModel<E,B>> com.google.common.base.Function<B,E> modelToEntity()
protected static <E,B extends AbstractApplicationFormUIModel<E,B>> com.google.common.base.Function<E,B> entityToModel(Class<B> modelType)
Copyright © 2008–2016 CodeLutin. All rights reserved.