package hero.rules.data; /* * Generated by XDoclet - Do not edit! */ /** * Value object for BnNode. * * Notice, this object is used to represent the state of an * BnNode object. This value object * Is not connected to the database in any way, it is just a normal object used * as a container for data from an EJB. * * @xdoclet-generated at ${TODAY} * @copyright The XDoclet Team * @author XDoclet * @version 3.0 */ public class BnNodeValue extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable { private java.lang.String id; private boolean idHasBeenSet = false; private int type; private boolean typeHasBeenSet = false; private int state; private boolean stateHasBeenSet = false; private boolean anticipable; private boolean anticipableHasBeenSet = false; private java.lang.String name; private boolean nameHasBeenSet = false; private java.lang.String reference; private boolean referenceHasBeenSet = false; private java.lang.String description; private boolean descriptionHasBeenSet = false; private java.lang.String activityPerformer; private boolean activityPerformerHasBeenSet = false; private java.util.Date startDate; private boolean startDateHasBeenSet = false; private java.util.Date endDate; private boolean endDateHasBeenSet = false; private java.util.Collection deadlines; private boolean deadlinesHasBeenSet = false; private java.util.Collection relativeDeadlines; private boolean relativeDeadlinesHasBeenSet = false; private java.lang.String creator; private boolean creatorHasBeenSet = false; private java.lang.String executor; private boolean executorHasBeenSet = false; private java.util.Date creationDate; private boolean creationDateHasBeenSet = false; private hero.rules.data.BnRoleValue BnRole; private boolean BnRoleHasBeenSet = false; private hero.interfaces.BnNodePerformerAssignValue BnNodePerformerAssign; private boolean BnNodePerformerAssignHasBeenSet = false; private hero.interfaces.BnProjectLightValue BnProject; private boolean BnProjectHasBeenSet = false; private java.util.Collection BnProperties = wrapCollection(new java.util.ArrayList() ); private java.util.Collection BnHooks = wrapCollection(new java.util.ArrayList() ); private java.util.Collection BnInterHooks = wrapCollection(new java.util.ArrayList() ); private hero.interfaces.BnNodePK primaryKey; public BnNodeValue() { primaryKey = new hero.interfaces.BnNodePK(); } public BnNodeValue( java.lang.String id,int type,int state,boolean anticipable,java.lang.String name,java.lang.String reference,java.lang.String description,java.lang.String activityPerformer,java.util.Date startDate,java.util.Date endDate,java.util.Collection deadlines,java.util.Collection relativeDeadlines,java.lang.String creator,java.lang.String executor,java.util.Date creationDate ) { setId(id); setType(type); setState(state); setAnticipable(anticipable); setName(name); setReference(reference); setDescription(description); setActivityPerformer(activityPerformer); setStartDate(startDate); setEndDate(endDate); setDeadlines(deadlines); setRelativeDeadlines(relativeDeadlines); setCreator(creator); setExecutor(executor); setCreationDate(creationDate); primaryKey = new hero.interfaces.BnNodePK(this.getId()); } /** * @deprecated use {@link #clone} */ public BnNodeValue( BnNodeValue otherValue ) { this.id = otherValue.id; idHasBeenSet = true; this.type = otherValue.type; typeHasBeenSet = true; this.state = otherValue.state; stateHasBeenSet = true; this.anticipable = otherValue.anticipable; anticipableHasBeenSet = true; this.name = otherValue.name; nameHasBeenSet = true; this.reference = otherValue.reference; referenceHasBeenSet = true; this.description = otherValue.description; descriptionHasBeenSet = true; this.activityPerformer = otherValue.activityPerformer; activityPerformerHasBeenSet = true; this.startDate = otherValue.startDate; startDateHasBeenSet = true; this.endDate = otherValue.endDate; endDateHasBeenSet = true; this.deadlines = otherValue.deadlines; deadlinesHasBeenSet = true; this.relativeDeadlines = otherValue.relativeDeadlines; relativeDeadlinesHasBeenSet = true; this.creator = otherValue.creator; creatorHasBeenSet = true; this.executor = otherValue.executor; executorHasBeenSet = true; this.creationDate = otherValue.creationDate; creationDateHasBeenSet = true; this.BnRole = otherValue.BnRole; BnRoleHasBeenSet = true; this.BnNodePerformerAssign = otherValue.BnNodePerformerAssign; BnNodePerformerAssignHasBeenSet = true; this.BnProject = otherValue.BnProject; BnProjectHasBeenSet = true; this.BnProperties.addAll(otherValue.BnProperties); this.BnHooks.addAll(otherValue.BnHooks); this.BnInterHooks.addAll(otherValue.BnInterHooks); primaryKey = new hero.interfaces.BnNodePK(this.getId()); } public hero.interfaces.BnNodePK getPrimaryKey() { return primaryKey; } public void setPrimaryKey( hero.interfaces.BnNodePK primaryKey) { // it's also nice to update PK object - just in case // somebody would ask for it later... this.primaryKey = primaryKey; setId( primaryKey.id ); } public java.lang.String getId() { return this.id; } public void setId( java.lang.String id ) { this.id = id; idHasBeenSet = true; primaryKey.setId(id); } public boolean idHasBeenSet(){ return idHasBeenSet; } public int getType() { return this.type; } public void setType( int type ) { this.type = type; typeHasBeenSet = true; } public boolean typeHasBeenSet(){ return typeHasBeenSet; } public int getState() { return this.state; } public void setState( int state ) { this.state = state; stateHasBeenSet = true; } public boolean stateHasBeenSet(){ return stateHasBeenSet; } public boolean getAnticipable() { return this.anticipable; } public void setAnticipable( boolean anticipable ) { this.anticipable = anticipable; anticipableHasBeenSet = true; } public boolean anticipableHasBeenSet(){ return anticipableHasBeenSet; } public java.lang.String getName() { return this.name; } public void setName( java.lang.String name ) { this.name = name; nameHasBeenSet = true; } public boolean nameHasBeenSet(){ return nameHasBeenSet; } public java.lang.String getReference() { return this.reference; } public void setReference( java.lang.String reference ) { this.reference = reference; referenceHasBeenSet = true; } public boolean referenceHasBeenSet(){ return referenceHasBeenSet; } public java.lang.String getDescription() { return this.description; } public void setDescription( java.lang.String description ) { this.description = description; descriptionHasBeenSet = true; } public boolean descriptionHasBeenSet(){ return descriptionHasBeenSet; } public java.lang.String getActivityPerformer() { return this.activityPerformer; } public void setActivityPerformer( java.lang.String activityPerformer ) { this.activityPerformer = activityPerformer; activityPerformerHasBeenSet = true; } public boolean activityPerformerHasBeenSet(){ return activityPerformerHasBeenSet; } public java.util.Date getStartDate() { return this.startDate; } public void setStartDate( java.util.Date startDate ) { this.startDate = startDate; startDateHasBeenSet = true; } public boolean startDateHasBeenSet(){ return startDateHasBeenSet; } public java.util.Date getEndDate() { return this.endDate; } public void setEndDate( java.util.Date endDate ) { this.endDate = endDate; endDateHasBeenSet = true; } public boolean endDateHasBeenSet(){ return endDateHasBeenSet; } public java.util.Collection getDeadlines() { return this.deadlines; } public void setDeadlines( java.util.Collection deadlines ) { this.deadlines = deadlines; deadlinesHasBeenSet = true; } public boolean deadlinesHasBeenSet(){ return deadlinesHasBeenSet; } public java.util.Collection getRelativeDeadlines() { return this.relativeDeadlines; } public void setRelativeDeadlines( java.util.Collection relativeDeadlines ) { this.relativeDeadlines = relativeDeadlines; relativeDeadlinesHasBeenSet = true; } public boolean relativeDeadlinesHasBeenSet(){ return relativeDeadlinesHasBeenSet; } public java.lang.String getCreator() { return this.creator; } public void setCreator( java.lang.String creator ) { this.creator = creator; creatorHasBeenSet = true; } public boolean creatorHasBeenSet(){ return creatorHasBeenSet; } public java.lang.String getExecutor() { return this.executor; } public void setExecutor( java.lang.String executor ) { this.executor = executor; executorHasBeenSet = true; } public boolean executorHasBeenSet(){ return executorHasBeenSet; } public java.util.Date getCreationDate() { return this.creationDate; } public void setCreationDate( java.util.Date creationDate ) { this.creationDate = creationDate; creationDateHasBeenSet = true; } public boolean creationDateHasBeenSet(){ return creationDateHasBeenSet; } public hero.rules.data.BnRoleValue getBnRole() { return this.BnRole; } public void setBnRole( hero.rules.data.BnRoleValue BnRole ) { this.BnRole = BnRole; BnRoleHasBeenSet = true; } public boolean bnRoleHasBeenSet() { return BnRoleHasBeenSet; } public hero.interfaces.BnNodePerformerAssignValue getBnNodePerformerAssign() { return this.BnNodePerformerAssign; } public void setBnNodePerformerAssign( hero.interfaces.BnNodePerformerAssignValue BnNodePerformerAssign ) { this.BnNodePerformerAssign = BnNodePerformerAssign; BnNodePerformerAssignHasBeenSet = true; } public boolean bnNodePerformerAssignHasBeenSet() { return BnNodePerformerAssignHasBeenSet; } public hero.interfaces.BnProjectLightValue getBnProject() { return this.BnProject; } public void setBnProject( hero.interfaces.BnProjectLightValue BnProject ) { this.BnProject = BnProject; BnProjectHasBeenSet = true; } public boolean bnProjectHasBeenSet() { return BnProjectHasBeenSet; } protected java.util.Collection addedBnProperties = wrapCollection(new java.util.ArrayList()); protected java.util.Collection onceAddedBnProperties = wrapCollection(new java.util.ArrayList()); protected java.util.Collection removedBnProperties = wrapCollection(new java.util.ArrayList()); protected java.util.Collection updatedBnProperties = wrapCollection(new java.util.ArrayList()); /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getAddedBnProperties() { return wrapReadOnly(addedBnProperties); } /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getOnceAddedBnProperties() { return wrapReadOnly(onceAddedBnProperties); } /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getRemovedBnProperties() { return wrapReadOnly(removedBnProperties); } /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getUpdatedBnProperties() { return wrapReadOnly(updatedBnProperties); } /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getBnPropertieCollection() { return wrapReadOnly(BnProperties); } /** * This will set the contents of the underlying collection to the contents of the * given collection. This means that any unmodifiable collections given out will * also change. The collections are guaranteed to be consistent, but not correct. * In this case, it is possible to see a collection in the process of changing, * it might appear to be empty for an instant, but it will behave correctly. * Also, the update will be atomic with respect to the input collection * if the input collection is a synchronized collection. * * This method has been deprecated, as it strains the imagination to conceive of * a reason for outsiders to modify these collections, which are really for our * own internal bookkeeping. * * @deprecated */ public void setAddedBnProperties(java.util.Collection addedBnProperties) { //This operation is atomic if the input collection is synchronized. java.util.List tempList = java.util.Arrays.asList(addedBnProperties.toArray()); this.addedBnProperties.clear(); this.addedBnProperties.addAll(tempList); } /** * This will set the contents of the underlying collection to the contents of the * given collection. This means that any unmodifiable collections given out will * also change. The collections are guaranteed to be consistent, but not correct. * In this case, it is possible to see a collection in the process of changing, * it might appear to be empty for an instant, but it will behave correctly. * Also, the update will be atomic with respect to the input collection * if the input collection is a synchronized collection. * * This method has been deprecated, as it strains the imagination to conceive of * a reason for outsiders to modify these collections, which are really for our * own internal bookkeeping. * * @deprecated */ public void setOnceAddedBnProperties(java.util.Collection onceAddedBnProperties) { //This operation is atomic if the input collection is synchronized. java.util.List tempList = java.util.Arrays.asList(onceAddedBnProperties.toArray()); this.onceAddedBnProperties.clear(); this.onceAddedBnProperties.addAll(tempList); } /** * This will set the contents of the underlying collection to the contents of the * given collection. This means that any unmodifiable collections given out will * also change. The collections are guaranteed to be consistent, but not correct. * In this case, it is possible to see a collection in the process of changing, * it might appear to be empty for an instant, but it will behave correctly. * Also, the update will be atomic with respect to the input collection * if the input collection is a synchronized collection. * * This method has been deprecated, as it strains the imagination to conceive of * a reason for outsiders to modify these collections, which are really for our * own internal bookkeeping. * * @deprecated */ public void setRemovedBnProperties(java.util.Collection removedBnProperties) { //This operation is atomic if the input collection is synchronized. java.util.List tempList = java.util.Arrays.asList(removedBnProperties.toArray()); this.removedBnProperties.clear(); this.removedBnProperties.addAll(tempList); } /** * This will set the contents of the underlying collection to the contents of the * given collection. This means that any unmodifiable collections given out will * also change. The collections are guaranteed to be consistent, but not correct. * In this case, it is possible to see a collection in the process of changing, * it might appear to be empty for an instant, but it will behave correctly. * Also, the update will be atomic with respect to the input collection * if the input collection is a synchronized collection. * * This method has been deprecated, as it strains the imagination to conceive of * a reason for outsiders to modify these collections, which are really for our * own internal bookkeeping. * * @deprecated */ public void setUpdatedBnProperties(java.util.Collection updatedBnProperties) { //This operation is atomic if the input collection is synchronized. java.util.List tempList = java.util.Arrays.asList(updatedBnProperties.toArray()); this.updatedBnProperties.clear(); this.updatedBnProperties.addAll(tempList); } /** * This method fetches the contents of the underlying collection as an Array. * It is a relatively expensive operation, so use the collections if you can. * * This operation is atomic and threadsafe unless the synchronization type is "none". * * This operation is deprecated, as it is fairly expensive and should be discouraged. * * @deprecated */ public hero.interfaces.BnNodePropertyValue[] getBnProperties() { return (hero.interfaces.BnNodePropertyValue[])this.BnProperties.toArray(new hero.interfaces.BnNodePropertyValue[BnProperties.size()]); } /** * This method sets the contents of the given attribute to the contents of the * given array. * * This operation is atomic and threadsafe unless the synchronization type is "none". * * This operation is deprecated, as it is fairly expensive and should be discouraged. * * @deprecated */ public void setBnProperties(hero.interfaces.BnNodePropertyValue[] BnProperties) { this.BnProperties.clear(); for (int i=0; i < BnProperties.length; i++) { this.BnProperties.add(BnProperties[i]); } } public void clearBnProperties() { this.BnProperties.clear(); } /** * When we're adding an aggregate object, we check if it was previously removed, and * if it was, we check if it was ever added. If the user adds an object, then removes * it then adds it again, we keep the object in the added collection. If the user * just removes an object (thas wasn't added in this session, just existed before) then * adds it again, we assume the user is updating a current existing object, so it will * end in the updated collection. */ public void addBnPropertie(hero.interfaces.BnNodePropertyValue added) { this.BnProperties.add(added); if (this.removedBnProperties.contains(added)) { this.removedBnProperties.remove(added); if (this.onceAddedBnProperties.contains(added)) { if (! this.addedBnProperties.contains(added)) this.addedBnProperties.add(added); } else if (! this.updatedBnProperties.contains(added)) { this.updatedBnProperties.add(added); } } else { if (! this.onceAddedBnProperties.contains(added)) this.onceAddedBnProperties.add(added); if (! this.addedBnProperties.contains(added)) this.addedBnProperties.add(added); } } /** * If we're removing an object that was previously added, we just remove it from * the added collection and don't add it in the remove collection. The user has * just given up on creating the object. If we're removing a previously updated * object, we remove it from the updated collection, since it will be removed * anyway. */ public void removeBnPropertie(hero.interfaces.BnNodePropertyValue removed) { this.BnProperties.remove(removed); if (this.addedBnProperties.contains(removed)) this.addedBnProperties.remove(removed); else if (! this.removedBnProperties.contains(removed)) this.removedBnProperties.add(removed); if (this.updatedBnProperties.contains(removed)) this.updatedBnProperties.remove(removed); } public void updateBnPropertie(hero.interfaces.BnNodePropertyValue updated) { if ( !this.updatedBnProperties.contains(updated) && !this.addedBnProperties.contains(updated)) this.updatedBnProperties.add(updated); if (this.removedBnProperties.contains(updated)) this.removedBnProperties.remove(updated); } public void cleanBnPropertie(){ this.addedBnProperties.clear(); this.onceAddedBnProperties.clear(); this.removedBnProperties.clear(); this.updatedBnProperties.clear(); } public void copyBnPropertiesFrom(hero.rules.data.BnNodeValue from) { this.BnProperties.clear(); this.BnProperties.addAll(from.BnProperties); } protected java.util.Collection addedBnHooks = wrapCollection(new java.util.ArrayList()); protected java.util.Collection onceAddedBnHooks = wrapCollection(new java.util.ArrayList()); protected java.util.Collection removedBnHooks = wrapCollection(new java.util.ArrayList()); protected java.util.Collection updatedBnHooks = wrapCollection(new java.util.ArrayList()); /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getAddedBnHooks() { return wrapReadOnly(addedBnHooks); } /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getOnceAddedBnHooks() { return wrapReadOnly(onceAddedBnHooks); } /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getRemovedBnHooks() { return wrapReadOnly(removedBnHooks); } /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getUpdatedBnHooks() { return wrapReadOnly(updatedBnHooks); } /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getBnHookCollection() { return wrapReadOnly(BnHooks); } /** * This will set the contents of the underlying collection to the contents of the * given collection. This means that any unmodifiable collections given out will * also change. The collections are guaranteed to be consistent, but not correct. * In this case, it is possible to see a collection in the process of changing, * it might appear to be empty for an instant, but it will behave correctly. * Also, the update will be atomic with respect to the input collection * if the input collection is a synchronized collection. * * This method has been deprecated, as it strains the imagination to conceive of * a reason for outsiders to modify these collections, which are really for our * own internal bookkeeping. * * @deprecated */ public void setAddedBnHooks(java.util.Collection addedBnHooks) { //This operation is atomic if the input collection is synchronized. java.util.List tempList = java.util.Arrays.asList(addedBnHooks.toArray()); this.addedBnHooks.clear(); this.addedBnHooks.addAll(tempList); } /** * This will set the contents of the underlying collection to the contents of the * given collection. This means that any unmodifiable collections given out will * also change. The collections are guaranteed to be consistent, but not correct. * In this case, it is possible to see a collection in the process of changing, * it might appear to be empty for an instant, but it will behave correctly. * Also, the update will be atomic with respect to the input collection * if the input collection is a synchronized collection. * * This method has been deprecated, as it strains the imagination to conceive of * a reason for outsiders to modify these collections, which are really for our * own internal bookkeeping. * * @deprecated */ public void setOnceAddedBnHooks(java.util.Collection onceAddedBnHooks) { //This operation is atomic if the input collection is synchronized. java.util.List tempList = java.util.Arrays.asList(onceAddedBnHooks.toArray()); this.onceAddedBnHooks.clear(); this.onceAddedBnHooks.addAll(tempList); } /** * This will set the contents of the underlying collection to the contents of the * given collection. This means that any unmodifiable collections given out will * also change. The collections are guaranteed to be consistent, but not correct. * In this case, it is possible to see a collection in the process of changing, * it might appear to be empty for an instant, but it will behave correctly. * Also, the update will be atomic with respect to the input collection * if the input collection is a synchronized collection. * * This method has been deprecated, as it strains the imagination to conceive of * a reason for outsiders to modify these collections, which are really for our * own internal bookkeeping. * * @deprecated */ public void setRemovedBnHooks(java.util.Collection removedBnHooks) { //This operation is atomic if the input collection is synchronized. java.util.List tempList = java.util.Arrays.asList(removedBnHooks.toArray()); this.removedBnHooks.clear(); this.removedBnHooks.addAll(tempList); } /** * This will set the contents of the underlying collection to the contents of the * given collection. This means that any unmodifiable collections given out will * also change. The collections are guaranteed to be consistent, but not correct. * In this case, it is possible to see a collection in the process of changing, * it might appear to be empty for an instant, but it will behave correctly. * Also, the update will be atomic with respect to the input collection * if the input collection is a synchronized collection. * * This method has been deprecated, as it strains the imagination to conceive of * a reason for outsiders to modify these collections, which are really for our * own internal bookkeeping. * * @deprecated */ public void setUpdatedBnHooks(java.util.Collection updatedBnHooks) { //This operation is atomic if the input collection is synchronized. java.util.List tempList = java.util.Arrays.asList(updatedBnHooks.toArray()); this.updatedBnHooks.clear(); this.updatedBnHooks.addAll(tempList); } /** * This method fetches the contents of the underlying collection as an Array. * It is a relatively expensive operation, so use the collections if you can. * * This operation is atomic and threadsafe unless the synchronization type is "none". * * This operation is deprecated, as it is fairly expensive and should be discouraged. * * @deprecated */ public hero.interfaces.BnNodeHookValue[] getBnHooks() { return (hero.interfaces.BnNodeHookValue[])this.BnHooks.toArray(new hero.interfaces.BnNodeHookValue[BnHooks.size()]); } /** * This method sets the contents of the given attribute to the contents of the * given array. * * This operation is atomic and threadsafe unless the synchronization type is "none". * * This operation is deprecated, as it is fairly expensive and should be discouraged. * * @deprecated */ public void setBnHooks(hero.interfaces.BnNodeHookValue[] BnHooks) { this.BnHooks.clear(); for (int i=0; i < BnHooks.length; i++) { this.BnHooks.add(BnHooks[i]); } } public void clearBnHooks() { this.BnHooks.clear(); } /** * When we're adding an aggregate object, we check if it was previously removed, and * if it was, we check if it was ever added. If the user adds an object, then removes * it then adds it again, we keep the object in the added collection. If the user * just removes an object (thas wasn't added in this session, just existed before) then * adds it again, we assume the user is updating a current existing object, so it will * end in the updated collection. */ public void addBnHook(hero.interfaces.BnNodeHookValue added) { this.BnHooks.add(added); if (this.removedBnHooks.contains(added)) { this.removedBnHooks.remove(added); if (this.onceAddedBnHooks.contains(added)) { if (! this.addedBnHooks.contains(added)) this.addedBnHooks.add(added); } else if (! this.updatedBnHooks.contains(added)) { this.updatedBnHooks.add(added); } } else { if (! this.onceAddedBnHooks.contains(added)) this.onceAddedBnHooks.add(added); if (! this.addedBnHooks.contains(added)) this.addedBnHooks.add(added); } } /** * If we're removing an object that was previously added, we just remove it from * the added collection and don't add it in the remove collection. The user has * just given up on creating the object. If we're removing a previously updated * object, we remove it from the updated collection, since it will be removed * anyway. */ public void removeBnHook(hero.interfaces.BnNodeHookValue removed) { this.BnHooks.remove(removed); if (this.addedBnHooks.contains(removed)) this.addedBnHooks.remove(removed); else if (! this.removedBnHooks.contains(removed)) this.removedBnHooks.add(removed); if (this.updatedBnHooks.contains(removed)) this.updatedBnHooks.remove(removed); } public void updateBnHook(hero.interfaces.BnNodeHookValue updated) { if ( !this.updatedBnHooks.contains(updated) && !this.addedBnHooks.contains(updated)) this.updatedBnHooks.add(updated); if (this.removedBnHooks.contains(updated)) this.removedBnHooks.remove(updated); } public void cleanBnHook(){ this.addedBnHooks.clear(); this.onceAddedBnHooks.clear(); this.removedBnHooks.clear(); this.updatedBnHooks.clear(); } public void copyBnHooksFrom(hero.rules.data.BnNodeValue from) { this.BnHooks.clear(); this.BnHooks.addAll(from.BnHooks); } protected java.util.Collection addedBnInterHooks = wrapCollection(new java.util.ArrayList()); protected java.util.Collection onceAddedBnInterHooks = wrapCollection(new java.util.ArrayList()); protected java.util.Collection removedBnInterHooks = wrapCollection(new java.util.ArrayList()); protected java.util.Collection updatedBnInterHooks = wrapCollection(new java.util.ArrayList()); /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getAddedBnInterHooks() { return wrapReadOnly(addedBnInterHooks); } /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getOnceAddedBnInterHooks() { return wrapReadOnly(onceAddedBnInterHooks); } /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getRemovedBnInterHooks() { return wrapReadOnly(removedBnInterHooks); } /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getUpdatedBnInterHooks() { return wrapReadOnly(updatedBnInterHooks); } /** * Important: This method returns an unmodifiable collection. */ public java.util.Collection getBnInterHookCollection() { return wrapReadOnly(BnInterHooks); } /** * This will set the contents of the underlying collection to the contents of the * given collection. This means that any unmodifiable collections given out will * also change. The collections are guaranteed to be consistent, but not correct. * In this case, it is possible to see a collection in the process of changing, * it might appear to be empty for an instant, but it will behave correctly. * Also, the update will be atomic with respect to the input collection * if the input collection is a synchronized collection. * * This method has been deprecated, as it strains the imagination to conceive of * a reason for outsiders to modify these collections, which are really for our * own internal bookkeeping. * * @deprecated */ public void setAddedBnInterHooks(java.util.Collection addedBnInterHooks) { //This operation is atomic if the input collection is synchronized. java.util.List tempList = java.util.Arrays.asList(addedBnInterHooks.toArray()); this.addedBnInterHooks.clear(); this.addedBnInterHooks.addAll(tempList); } /** * This will set the contents of the underlying collection to the contents of the * given collection. This means that any unmodifiable collections given out will * also change. The collections are guaranteed to be consistent, but not correct. * In this case, it is possible to see a collection in the process of changing, * it might appear to be empty for an instant, but it will behave correctly. * Also, the update will be atomic with respect to the input collection * if the input collection is a synchronized collection. * * This method has been deprecated, as it strains the imagination to conceive of * a reason for outsiders to modify these collections, which are really for our * own internal bookkeeping. * * @deprecated */ public void setOnceAddedBnInterHooks(java.util.Collection onceAddedBnInterHooks) { //This operation is atomic if the input collection is synchronized. java.util.List tempList = java.util.Arrays.asList(onceAddedBnInterHooks.toArray()); this.onceAddedBnInterHooks.clear(); this.onceAddedBnInterHooks.addAll(tempList); } /** * This will set the contents of the underlying collection to the contents of the * given collection. This means that any unmodifiable collections given out will * also change. The collections are guaranteed to be consistent, but not correct. * In this case, it is possible to see a collection in the process of changing, * it might appear to be empty for an instant, but it will behave correctly. * Also, the update will be atomic with respect to the input collection * if the input collection is a synchronized collection. * * This method has been deprecated, as it strains the imagination to conceive of * a reason for outsiders to modify these collections, which are really for our * own internal bookkeeping. * * @deprecated */ public void setRemovedBnInterHooks(java.util.Collection removedBnInterHooks) { //This operation is atomic if the input collection is synchronized. java.util.List tempList = java.util.Arrays.asList(removedBnInterHooks.toArray()); this.removedBnInterHooks.clear(); this.removedBnInterHooks.addAll(tempList); } /** * This will set the contents of the underlying collection to the contents of the * given collection. This means that any unmodifiable collections given out will * also change. The collections are guaranteed to be consistent, but not correct. * In this case, it is possible to see a collection in the process of changing, * it might appear to be empty for an instant, but it will behave correctly. * Also, the update will be atomic with respect to the input collection * if the input collection is a synchronized collection. * * This method has been deprecated, as it strains the imagination to conceive of * a reason for outsiders to modify these collections, which are really for our * own internal bookkeeping. * * @deprecated */ public void setUpdatedBnInterHooks(java.util.Collection updatedBnInterHooks) { //This operation is atomic if the input collection is synchronized. java.util.List tempList = java.util.Arrays.asList(updatedBnInterHooks.toArray()); this.updatedBnInterHooks.clear(); this.updatedBnInterHooks.addAll(tempList); } /** * This method fetches the contents of the underlying collection as an Array. * It is a relatively expensive operation, so use the collections if you can. * * This operation is atomic and threadsafe unless the synchronization type is "none". * * This operation is deprecated, as it is fairly expensive and should be discouraged. * * @deprecated */ public hero.interfaces.BnNodeInterHookValue[] getBnInterHooks() { return (hero.interfaces.BnNodeInterHookValue[])this.BnInterHooks.toArray(new hero.interfaces.BnNodeInterHookValue[BnInterHooks.size()]); } /** * This method sets the contents of the given attribute to the contents of the * given array. * * This operation is atomic and threadsafe unless the synchronization type is "none". * * This operation is deprecated, as it is fairly expensive and should be discouraged. * * @deprecated */ public void setBnInterHooks(hero.interfaces.BnNodeInterHookValue[] BnInterHooks) { this.BnInterHooks.clear(); for (int i=0; i < BnInterHooks.length; i++) { this.BnInterHooks.add(BnInterHooks[i]); } } public void clearBnInterHooks() { this.BnInterHooks.clear(); } /** * When we're adding an aggregate object, we check if it was previously removed, and * if it was, we check if it was ever added. If the user adds an object, then removes * it then adds it again, we keep the object in the added collection. If the user * just removes an object (thas wasn't added in this session, just existed before) then * adds it again, we assume the user is updating a current existing object, so it will * end in the updated collection. */ public void addBnInterHook(hero.interfaces.BnNodeInterHookValue added) { this.BnInterHooks.add(added); if (this.removedBnInterHooks.contains(added)) { this.removedBnInterHooks.remove(added); if (this.onceAddedBnInterHooks.contains(added)) { if (! this.addedBnInterHooks.contains(added)) this.addedBnInterHooks.add(added); } else if (! this.updatedBnInterHooks.contains(added)) { this.updatedBnInterHooks.add(added); } } else { if (! this.onceAddedBnInterHooks.contains(added)) this.onceAddedBnInterHooks.add(added); if (! this.addedBnInterHooks.contains(added)) this.addedBnInterHooks.add(added); } } /** * If we're removing an object that was previously added, we just remove it from * the added collection and don't add it in the remove collection. The user has * just given up on creating the object. If we're removing a previously updated * object, we remove it from the updated collection, since it will be removed * anyway. */ public void removeBnInterHook(hero.interfaces.BnNodeInterHookValue removed) { this.BnInterHooks.remove(removed); if (this.addedBnInterHooks.contains(removed)) this.addedBnInterHooks.remove(removed); else if (! this.removedBnInterHooks.contains(removed)) this.removedBnInterHooks.add(removed); if (this.updatedBnInterHooks.contains(removed)) this.updatedBnInterHooks.remove(removed); } public void updateBnInterHook(hero.interfaces.BnNodeInterHookValue updated) { if ( !this.updatedBnInterHooks.contains(updated) && !this.addedBnInterHooks.contains(updated)) this.updatedBnInterHooks.add(updated); if (this.removedBnInterHooks.contains(updated)) this.removedBnInterHooks.remove(updated); } public void cleanBnInterHook(){ this.addedBnInterHooks.clear(); this.onceAddedBnInterHooks.clear(); this.removedBnInterHooks.clear(); this.updatedBnInterHooks.clear(); } public void copyBnInterHooksFrom(hero.rules.data.BnNodeValue from) { this.BnInterHooks.clear(); this.BnInterHooks.addAll(from.BnInterHooks); } public String toString() { StringBuffer str = new StringBuffer("{"); str.append("id=" + getId() + " " + "type=" + getType() + " " + "state=" + getState() + " " + "anticipable=" + getAnticipable() + " " + "name=" + getName() + " " + "reference=" + getReference() + " " + "description=" + getDescription() + " " + "activityPerformer=" + getActivityPerformer() + " " + "startDate=" + getStartDate() + " " + "endDate=" + getEndDate() + " " + "deadlines=" + getDeadlines() + " " + "relativeDeadlines=" + getRelativeDeadlines() + " " + "creator=" + getCreator() + " " + "executor=" + getExecutor() + " " + "creationDate=" + getCreationDate()); str.append('}'); return(str.toString()); } /** * A Value Object has an identity if the attributes making its Primary Key have all been set. An object without identity is never equal to any other object. * * @return true if this instance has an identity. */ protected boolean hasIdentity() { boolean ret = true; ret = ret && idHasBeenSet; return ret; } /** * * @deprecated use {@link #equals} */ public boolean isIdentical(Object other) { if (other instanceof BnNodeValue) { BnNodeValue that = (BnNodeValue) other; boolean lEquals = true; lEquals = lEquals && this.type == that.type; lEquals = lEquals && this.state == that.state; lEquals = lEquals && this.anticipable == that.anticipable; if( this.name == null ) { lEquals = lEquals && ( that.name == null ); } else { lEquals = lEquals && this.name.equals( that.name ); } if( this.reference == null ) { lEquals = lEquals && ( that.reference == null ); } else { lEquals = lEquals && this.reference.equals( that.reference ); } if( this.description == null ) { lEquals = lEquals && ( that.description == null ); } else { lEquals = lEquals && this.description.equals( that.description ); } if( this.activityPerformer == null ) { lEquals = lEquals && ( that.activityPerformer == null ); } else { lEquals = lEquals && this.activityPerformer.equals( that.activityPerformer ); } if( this.startDate == null ) { lEquals = lEquals && ( that.startDate == null ); } else { lEquals = lEquals && this.startDate.equals( that.startDate ); } if( this.endDate == null ) { lEquals = lEquals && ( that.endDate == null ); } else { lEquals = lEquals && this.endDate.equals( that.endDate ); } if( this.deadlines == null ) { lEquals = lEquals && ( that.deadlines == null ); } else { lEquals = lEquals && this.deadlines.equals( that.deadlines ); } if( this.relativeDeadlines == null ) { lEquals = lEquals && ( that.relativeDeadlines == null ); } else { lEquals = lEquals && this.relativeDeadlines.equals( that.relativeDeadlines ); } if( this.creator == null ) { lEquals = lEquals && ( that.creator == null ); } else { lEquals = lEquals && this.creator.equals( that.creator ); } if( this.executor == null ) { lEquals = lEquals && ( that.executor == null ); } else { lEquals = lEquals && this.executor.equals( that.executor ); } if( this.creationDate == null ) { lEquals = lEquals && ( that.creationDate == null ); } else { lEquals = lEquals && this.creationDate.equals( that.creationDate ); } if( this.BnRole == null ) { lEquals = lEquals && ( that.BnRole == null ); } else { lEquals = lEquals && this.BnRole.equals( that.BnRole ); } if( this.BnNodePerformerAssign == null ) { lEquals = lEquals && ( that.BnNodePerformerAssign == null ); } else { lEquals = lEquals && this.BnNodePerformerAssign.equals( that.BnNodePerformerAssign ); } if( this.BnProject == null ) { lEquals = lEquals && ( that.BnProject == null ); } else { lEquals = lEquals && this.BnProject.equals( that.BnProject ); } if( this.getBnProperties() == null ) { lEquals = lEquals && ( that.getBnProperties() == null ); } else { lEquals = lEquals && java.util.Arrays.equals(this.getBnProperties() , that.getBnProperties()) ; } if( this.getBnHooks() == null ) { lEquals = lEquals && ( that.getBnHooks() == null ); } else { lEquals = lEquals && java.util.Arrays.equals(this.getBnHooks() , that.getBnHooks()) ; } if( this.getBnInterHooks() == null ) { lEquals = lEquals && ( that.getBnInterHooks() == null ); } else { lEquals = lEquals && java.util.Arrays.equals(this.getBnInterHooks() , that.getBnInterHooks()) ; } return lEquals; } else { return false; } } public boolean equals(Object other) { //If it's not the correct type, clearly it isn't equal to this. if (!(other instanceof BnNodeValue)) { return false; } return equals((BnNodeValue) other); } /** * This class is not using strict ordering. This means that the object is not Comparable, and * each check for equality will test all members for equality. We do not check collections for * equality however, so you would be wise to not use this if you have collection typed EJB References. */ public boolean equals(BnNodeValue that) { //try to get lucky. if (this == that) { return true; } //this clearly isn't null. if(null == that) { return false; } if(this.id != that.id) { if( this.id == null || that.id == null ) { return false; } if(!this.id.equals(that.id)) { return false; } } if(this.type != that.type) { return false; } if(this.state != that.state) { return false; } if(this.anticipable != that.anticipable) { return false; } if(this.name != that.name) { if( this.name == null || that.name == null ) { return false; } if(!this.name.equals(that.name)) { return false; } } if(this.reference != that.reference) { if( this.reference == null || that.reference == null ) { return false; } if(!this.reference.equals(that.reference)) { return false; } } if(this.description != that.description) { if( this.description == null || that.description == null ) { return false; } if(!this.description.equals(that.description)) { return false; } } if(this.activityPerformer != that.activityPerformer) { if( this.activityPerformer == null || that.activityPerformer == null ) { return false; } if(!this.activityPerformer.equals(that.activityPerformer)) { return false; } } if(this.startDate != that.startDate) { if( this.startDate == null || that.startDate == null ) { return false; } if(!this.startDate.equals(that.startDate)) { return false; } } if(this.endDate != that.endDate) { if( this.endDate == null || that.endDate == null ) { return false; } if(!this.endDate.equals(that.endDate)) { return false; } } if(this.deadlines != that.deadlines) { if( this.deadlines == null || that.deadlines == null ) { return false; } if(!this.deadlines.equals(that.deadlines)) { return false; } } if(this.relativeDeadlines != that.relativeDeadlines) { if( this.relativeDeadlines == null || that.relativeDeadlines == null ) { return false; } if(!this.relativeDeadlines.equals(that.relativeDeadlines)) { return false; } } if(this.creator != that.creator) { if( this.creator == null || that.creator == null ) { return false; } if(!this.creator.equals(that.creator)) { return false; } } if(this.executor != that.executor) { if( this.executor == null || that.executor == null ) { return false; } if(!this.executor.equals(that.executor)) { return false; } } if(this.creationDate != that.creationDate) { if( this.creationDate == null || that.creationDate == null ) { return false; } if(!this.creationDate.equals(that.creationDate)) { return false; } } if(this.BnRole != that.BnRole) { if((this.BnRole == null) || (that.BnRole == null)) { return false; } if(!this.BnRole.equals(that.BnRole)) { return false; } } if(this.BnNodePerformerAssign != that.BnNodePerformerAssign) { if((this.BnNodePerformerAssign == null) || (that.BnNodePerformerAssign == null)) { return false; } if(!this.BnNodePerformerAssign.equals(that.BnNodePerformerAssign)) { return false; } } if(this.BnProject != that.BnProject) { if((this.BnProject == null) || (that.BnProject == null)) { return false; } if(!this.BnProject.equals(that.BnProject)) { return false; } } // BnPropertie is an aggregate type. We won't compare the contents of collections (for performance reasons), so note //that these will not be considered when calculating equality or hash codes. You would be wise to use strict ordering if possible, as that makes //for more tractable behavior. // BnHook is an aggregate type. We won't compare the contents of collections (for performance reasons), so note //that these will not be considered when calculating equality or hash codes. You would be wise to use strict ordering if possible, as that makes //for more tractable behavior. // BnInterHook is an aggregate type. We won't compare the contents of collections (for performance reasons), so note //that these will not be considered when calculating equality or hash codes. You would be wise to use strict ordering if possible, as that makes //for more tractable behavior. return true; } public Object clone() throws java.lang.CloneNotSupportedException { BnNodeValue other = (BnNodeValue) super.clone(); { //Anonymous block to protect from namespace collisions. java.util.Collection tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.BnProperties); this.BnProperties = tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.addedBnProperties); this.addedBnProperties = tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.onceAddedBnProperties); this.onceAddedBnProperties = tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.removedBnProperties); this.removedBnProperties = tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.updatedBnProperties); this.updatedBnProperties = tempData; } { //Anonymous block to protect from namespace collisions. java.util.Collection tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.BnHooks); this.BnHooks = tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.addedBnHooks); this.addedBnHooks = tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.onceAddedBnHooks); this.onceAddedBnHooks = tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.removedBnHooks); this.removedBnHooks = tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.updatedBnHooks); this.updatedBnHooks = tempData; } { //Anonymous block to protect from namespace collisions. java.util.Collection tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.BnInterHooks); this.BnInterHooks = tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.addedBnInterHooks); this.addedBnInterHooks = tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.onceAddedBnInterHooks); this.onceAddedBnInterHooks = tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.removedBnInterHooks); this.removedBnInterHooks = tempData; tempData = wrapCollection(new java.util.ArrayList()); tempData.addAll(this.updatedBnInterHooks); this.updatedBnInterHooks = tempData; } return other; } public ReadOnlyBnNodeValue getReadOnlyBnNodeValue() { return new ReadOnlyBnNodeValue(); } public int hashCode(){ int result = 17; result = 37*result + ((this.id != null) ? this.id.hashCode() : 0); result = 37*result + (int) type; result = 37*result + (int) state; result = 37*result + (anticipable ? 0 : 1); result = 37*result + ((this.name != null) ? this.name.hashCode() : 0); result = 37*result + ((this.reference != null) ? this.reference.hashCode() : 0); result = 37*result + ((this.description != null) ? this.description.hashCode() : 0); result = 37*result + ((this.activityPerformer != null) ? this.activityPerformer.hashCode() : 0); result = 37*result + ((this.startDate != null) ? this.startDate.hashCode() : 0); result = 37*result + ((this.endDate != null) ? this.endDate.hashCode() : 0); result = 37*result + ((this.deadlines != null) ? this.deadlines.hashCode() : 0); result = 37*result + ((this.relativeDeadlines != null) ? this.relativeDeadlines.hashCode() : 0); result = 37*result + ((this.creator != null) ? this.creator.hashCode() : 0); result = 37*result + ((this.executor != null) ? this.executor.hashCode() : 0); result = 37*result + ((this.creationDate != null) ? this.creationDate.hashCode() : 0); result = 37*result + ((this.BnRole != null) ? this.BnRole.hashCode() : 0); result = 37*result + ((this.BnNodePerformerAssign != null) ? this.BnNodePerformerAssign.hashCode() : 0); result = 37*result + ((this.BnProject != null) ? this.BnProject.hashCode() : 0); // BnPropertie is an aggregate type. We won't compare the contents of collections (for performance reasons), so note //that these will not be considered when calculating equality or hash codes. You would be wise to use strict ordering if possible, as that makes //for more tractable behavior. // BnHook is an aggregate type. We won't compare the contents of collections (for performance reasons), so note //that these will not be considered when calculating equality or hash codes. You would be wise to use strict ordering if possible, as that makes //for more tractable behavior. // BnInterHook is an aggregate type. We won't compare the contents of collections (for performance reasons), so note //that these will not be considered when calculating equality or hash codes. You would be wise to use strict ordering if possible, as that makes //for more tractable behavior. return result; } /** * Covariant function so the compiler can choose the proper one at compile time, * eliminates the need for XDoclet to really understand compiletime typing. * * Read only collections need to be synchronized. Once we start giving out handles * to these collections, they'll be used in other threads sooner or later. */ private static java.util.Collection wrapCollection(java.util.Collection input) { return java.util.Collections.synchronizedCollection(input); } /** * Covariant function so the compiler can choose the proper one at compile time, * eliminates the need for XDoclet to really understand compiletime typing. * * Read only collections need to be synchronized. Once we start giving out handles * to these collections, they'll be used in other threads sooner or later. */ private static java.util.Set wrapCollection(java.util.Set input) { return java.util.Collections.synchronizedSet(input); } /** * Covariant function. This is used in covariant form so that the compiler * can do some of our conditional branches for us. If I made these functions * have different names, then XDoclet would have to choose between them based on * compiletime types, that wouldn't be easy. */ private static java.util.Collection wrapReadOnly(java.util.Collection input) { return java.util.Collections.unmodifiableCollection(input); } /** * Covariant function. This is used in covariant form so that the compiler * can do some of our conditional branches for us. If I made these functions * have different names, then XDoclet would have to choose between them based on * compiletime types, that wouldn't be easy. */ private static java.util.Set wrapReadOnly(java.util.Set input) { return java.util.Collections.unmodifiableSet(input); } private final class ReadOnlyBnNodeValue implements java.lang.Cloneable, java.io.Serializable { private BnNodeValue underlying() { return BnNodeValue.this; } public java.lang.String getId() { return underlying().id; } public int getType() { return underlying().type; } public int getState() { return underlying().state; } public boolean getAnticipable() { return underlying().anticipable; } public java.lang.String getName() { return underlying().name; } public java.lang.String getReference() { return underlying().reference; } public java.lang.String getDescription() { return underlying().description; } public java.lang.String getActivityPerformer() { return underlying().activityPerformer; } public java.util.Date getStartDate() { return underlying().startDate; } public java.util.Date getEndDate() { return underlying().endDate; } public java.util.Collection getDeadlines() { return underlying().deadlines; } public java.util.Collection getRelativeDeadlines() { return underlying().relativeDeadlines; } public java.lang.String getCreator() { return underlying().creator; } public java.lang.String getExecutor() { return underlying().executor; } public java.util.Date getCreationDate() { return underlying().creationDate; } public hero.rules.data.BnRoleValue getBnRole() { return underlying().BnRole; } public hero.interfaces.BnNodePerformerAssignValue getBnNodePerformerAssign() { return underlying().BnNodePerformerAssign; } public hero.interfaces.BnProjectLightValue getBnProject() { return underlying().BnProject; } public java.util.Collection getAddedBnProperties() { return underlying().getAddedBnProperties(); } public java.util.Collection getOnceAddedBnProperties() { return underlying().getOnceAddedBnProperties(); } public java.util.Collection getRemovedBnProperties() { return underlying().getRemovedBnProperties(); } public java.util.Collection getUpdatedBnProperties() { return underlying().getUpdatedBnProperties(); } public java.util.Collection getBnPropertieCollection() { return underlying().getBnPropertieCollection(); } public java.util.Collection getAddedBnHooks() { return underlying().getAddedBnHooks(); } public java.util.Collection getOnceAddedBnHooks() { return underlying().getOnceAddedBnHooks(); } public java.util.Collection getRemovedBnHooks() { return underlying().getRemovedBnHooks(); } public java.util.Collection getUpdatedBnHooks() { return underlying().getUpdatedBnHooks(); } public java.util.Collection getBnHookCollection() { return underlying().getBnHookCollection(); } public java.util.Collection getAddedBnInterHooks() { return underlying().getAddedBnInterHooks(); } public java.util.Collection getOnceAddedBnInterHooks() { return underlying().getOnceAddedBnInterHooks(); } public java.util.Collection getRemovedBnInterHooks() { return underlying().getRemovedBnInterHooks(); } public java.util.Collection getUpdatedBnInterHooks() { return underlying().getUpdatedBnInterHooks(); } public java.util.Collection getBnInterHookCollection() { return underlying().getBnInterHookCollection(); } public int hashCode() { return 101 * underlying().hashCode(); } public boolean equals(Object o) { if(o instanceof ReadOnlyBnNodeValue) { return this.equals((ReadOnlyBnNodeValue) o); } return false; } public boolean equals(ReadOnlyBnNodeValue that) { if(null == that) { return false; } return this.underlying().equals(that.underlying()); } } }