org.nakedobjects.plugins.headless.embedded.internal
Class StandaloneAdapter

java.lang.Object
  extended by org.nakedobjects.plugins.headless.embedded.internal.StandaloneAdapter
All Implemented Interfaces:
Instance, NakedObject, NakedObjectMM
Direct Known Subclasses:
ServiceAdapter

public class StandaloneAdapter
extends java.lang.Object
implements NakedObject

Only provides a concrete implementation of the methods corresponding to the NakedObjectMM interface.


Constructor Summary
StandaloneAdapter(NakedObjectSpecification spec, java.lang.Object domainObject, PersistenceState persistenceState)
           
 
Method Summary
 void changeState(ResolveState newState)
          Not supported, always throws an exception.
 void checkLock(Version version)
          Not supported, always throws an exception.
 void fireChangedEvent()
          Not supported, always throws an exception.
 java.lang.String getIconName()
          Not supported, always throws an exception.
 Instance getInstance(Specification specification)
          Not supported, always throws an exception.
 java.lang.Object getObject()
          Returns the domain object as provided in the constructor.
 Oid getOid()
          Not supported, always throws an exception.
 NakedObject getOwner()
          Always returns null.
 ResolveState getResolveState()
          Not supported, always throws an exception.
 NakedObjectSpecification getSpecification()
          Returns the NakedObjectSpecification as provided in the constructor.
 TypeOfFacet getTypeOfFacet()
          Returns the overridden TypeOfFacet, else looks up from specification (if any).
 Version getVersion()
          Not supported, always throws an exception.
 boolean isAggregated()
          Not supported, always throws an exception.
 boolean isPersistent()
          Whether the object is persisted.
 boolean isTransient()
          Whether the object is not persisted.
 void replacePojo(java.lang.Object pojo)
          Replaces the domain object.
 void setOptimisticLock(Version version)
          Not supported, always throws an exception.
 void setTypeOfFacet(TypeOfFacet typeOfFacet)
          Override (or set the) TypeOfFacet.
 java.lang.String titleString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandaloneAdapter

public StandaloneAdapter(NakedObjectSpecification spec,
                         java.lang.Object domainObject,
                         PersistenceState persistenceState)
Method Detail

getSpecification

public NakedObjectSpecification getSpecification()
Returns the NakedObjectSpecification as provided in the constructor.

Specified by:
getSpecification in interface Instance
Specified by:
getSpecification in interface NakedObjectMM

getObject

public java.lang.Object getObject()
Returns the domain object as provided in the constructor.

Specified by:
getObject in interface NakedObjectMM

replacePojo

public void replacePojo(java.lang.Object pojo)
Replaces the domain object.

Specified by:
replacePojo in interface NakedObjectMM

isPersistent

public boolean isPersistent()
Whether the object is persisted.

As per the PersistenceState provided in the constructor.

Specified by:
isPersistent in interface NakedObjectMM

isTransient

public boolean isTransient()
Whether the object is not persisted.

As per the PersistenceState provided in the constructor.

Specified by:
isTransient in interface NakedObjectMM

getOwner

public NakedObject getOwner()
Always returns null.

Specified by:
getOwner in interface Instance

titleString

public java.lang.String titleString()
Specified by:
titleString in interface NakedObjectMM

getTypeOfFacet

public TypeOfFacet getTypeOfFacet()
Returns the overridden TypeOfFacet, else looks up from specification (if any).

Specified by:
getTypeOfFacet in interface NakedObjectMM

setTypeOfFacet

public void setTypeOfFacet(TypeOfFacet typeOfFacet)
Override (or set the) TypeOfFacet.

Specified by:
setTypeOfFacet in interface NakedObjectMM

getResolveState

public ResolveState getResolveState()
Not supported, always throws an exception.

Specified by:
getResolveState in interface NakedObject
Throws:
java.lang.UnsupportedOperationException

changeState

public void changeState(ResolveState newState)
Not supported, always throws an exception.

Specified by:
changeState in interface NakedObject
Throws:
java.lang.UnsupportedOperationException

getOid

public Oid getOid()
Not supported, always throws an exception.

Specified by:
getOid in interface NakedObject
Throws:
java.lang.UnsupportedOperationException

isAggregated

public boolean isAggregated()
Not supported, always throws an exception.

Specified by:
isAggregated in interface NakedObject
Throws:
java.lang.UnsupportedOperationException

getIconName

public java.lang.String getIconName()
Not supported, always throws an exception.

Specified by:
getIconName in interface NakedObject
Throws:
java.lang.UnsupportedOperationException

getInstance

public Instance getInstance(Specification specification)
Not supported, always throws an exception.

Specified by:
getInstance in interface NakedObjectMM
Throws:
java.lang.UnsupportedOperationException

getVersion

public Version getVersion()
Not supported, always throws an exception.

Specified by:
getVersion in interface NakedObject
Throws:
java.lang.UnsupportedOperationException

checkLock

public void checkLock(Version version)
Not supported, always throws an exception.

Specified by:
checkLock in interface NakedObject
Throws:
java.lang.UnsupportedOperationException

setOptimisticLock

public void setOptimisticLock(Version version)
Not supported, always throws an exception.

Specified by:
setOptimisticLock in interface NakedObject
Throws:
java.lang.UnsupportedOperationException

fireChangedEvent

public void fireChangedEvent()
Not supported, always throws an exception.

Specified by:
fireChangedEvent in interface NakedObject
Throws:
java.lang.UnsupportedOperationException


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.