Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.sapia.util.xml.confix;


Models a "creation status". A creation status encapsulates:
  • The object that is created by a given object factory;
  • A flag that indicates if the created instance was assigned to its parent - through a set/add method.
An instance of this class is not created through a constructor; rather, it is created as such:
 CreationStatus stat = CreationStatus.create(someObject);
 

Author(s):
Yanick Duchesne
Copyright:
Copyright &.169; 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
public class CreationStatus {
  boolean _assigned = false;
  private CreationStatus(Object created) {
     = created;
  }

  
Returns the created object.

Returns:
an Object.
  public Object getCreated() {
    //		if(_created != null && _created instanceof NullObject){
    //			return null;
    //		}
    return ;
  }

  
Sets the object that was created.

Parameters:
an Object.
  public void setCreated(Object created) {
     = created;
  }

  
Returns true if the encapsulated object was assigned to its parent.

Returns:
true if the encapsulated object was assigned to its parent.
  public boolean wasAssigned() {
    return ;
  }

  
Sets this instance's "assigned" status.

Parameters:
assigned if true, indicates that the object encapsulated within this instance was assigned to its parent.
  public CreationStatus assigned(boolean assigned) {
     = assigned;
    return this;
  }

  
Returns a CreationStatus that encapsulates the given instance.

Parameters:
created the created object.
Returns:
a CreationStatus.
  public static CreationStatus create(Object created) {
    return new CreationStatus(created);
  }
New to GrepCode? Check out our FAQ X