public class HubAutoSequence extends HubListenerAdapter implements Serializable
HubListener.InsertLocation
Modifier and Type | Field and Description |
---|---|
static int |
AutoSequenceHubListenerCount |
protected boolean |
bKeepSeq |
protected boolean |
bServerSideOnly |
protected Hub |
hub |
protected String |
propertyName |
protected Method |
propertySetMethod |
protected int |
startNumber |
Constructor and Description |
---|
HubAutoSequence() |
HubAutoSequence(Hub hub,
String propertyName)
Create a new HubAutoSequence.
|
HubAutoSequence(Hub hub,
String propertyName,
int startNumber)
Create a new HubAutoSequence.
|
HubAutoSequence(Hub hub,
String propertyName,
int startNumber,
boolean bKeepSeq)
Create a new HubAutoSequence.
|
HubAutoSequence(Hub hub,
String propertyName,
int startNumber,
boolean bKeepSeq,
boolean bServerSideOnly) |
Modifier and Type | Method and Description |
---|---|
void |
afterAdd(HubEvent e)
HubListener interface method, used to listen to changes to Hub and update sequence numbers.
|
void |
afterInsert(HubEvent e)
HubListener interface method, used to listen to changes to Hub and update sequence numbers.
|
void |
afterMove(HubEvent e)
HubListener interface method, used to listen to changes to Hub and update sequence numbers.
|
void |
afterRemove(HubEvent e)
HubListener interface method, used to listen to changes to Hub and update sequence numbers.
|
void |
afterSort(HubEvent e)
HubListener interface method, used to listen to changes to Hub and update sequence numbers.
|
void |
close() |
protected void |
finalize() |
Hub |
getHub() |
String |
getPropertyName()
Number property in object that is used to keep track of the order of the object within the hub.
|
int |
getStartNumber()
Set the starting number to be used for first object.
|
void |
onNewList(HubEvent e)
HubListener interface method, used to listen to changes to Hub and update sequence numbers.
|
void |
resequence() |
protected void |
resequence(int startPos) |
void |
setHub(Hub hub) |
void |
setPropertyName(String propertyName) |
void |
setStartNumber(int i)
Set the starting number to be used for first object.
|
protected void |
setup() |
protected void |
updateSequence(Object obj,
int pos) |
afterChangeActiveObject, afterDelete, afterLoad, afterNewList, afterPropertyChange, afterRemoveAll, afterSave, beforeAdd, beforeDelete, beforeInsert, beforeMove, beforePropertyChange, beforeRemove, beforeRemoveAll, beforeSave, beforeSelect, getLocation, setLocation
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAllowAdd, getAllowDelete, getAllowEnabled, getAllowRemove, getAllowRemoveAll, getAllowVisible, isValidAdd, isValidDelete, isValidPropertyChange, isValidRemove, isValidRemoveAll
public static int AutoSequenceHubListenerCount
protected Hub hub
protected String propertyName
protected transient Method propertySetMethod
protected int startNumber
protected boolean bKeepSeq
protected boolean bServerSideOnly
public HubAutoSequence()
public HubAutoSequence(Hub hub, String propertyName, int startNumber)
propertyName
- is int property for storing number.public HubAutoSequence(Hub hub, String propertyName, int startNumber, boolean bKeepSeq)
propertyName
- is int property for storing number.bKeepSeq,
- if false then seq numbers are not updated when an object is removedpublic HubAutoSequence(Hub hub, String propertyName, int startNumber, boolean bKeepSeq, boolean bServerSideOnly)
hub
- propertyName
- startNumber
- bKeepSeq
- bServerSideOnly
- this is used by Hub.setAutoSequence(...) so that the server will control the seq property and
send CS messages to clients. If true, then the property changes (for seq prop) will need to be sent to clients.protected void finalize() throws Throwable
public void close()
public int getStartNumber()
public void setStartNumber(int i)
public Hub getHub()
public void setHub(Hub hub)
public String getPropertyName()
Note: the object is not automatically saved.
public void setPropertyName(String propertyName)
getPropertyName
protected void setup()
public void resequence()
protected void resequence(int startPos)
protected void updateSequence(Object obj, int pos)
public void afterInsert(HubEvent e)
afterInsert
in interface HubListener
afterInsert
in class HubListenerAdapter
public void afterAdd(HubEvent e)
afterAdd
in interface HubListener
afterAdd
in class HubListenerAdapter
Hub.add
public void afterRemove(HubEvent e)
afterRemove
in interface HubListener
afterRemove
in class HubListenerAdapter
public void afterMove(HubEvent e)
afterMove
in interface HubListener
afterMove
in class HubListenerAdapter
public void onNewList(HubEvent e)
onNewList
in interface HubListener
onNewList
in class HubListenerAdapter
public void afterSort(HubEvent e)
afterSort
in interface HubListener
afterSort
in class HubListenerAdapter
Hub.sort
Copyright © 1999–2019 ViaOA. All rights reserved.