org.simantics.databoard.accessor.java
Class JavaLong

java.lang.Object
  extended by org.simantics.databoard.accessor.java.JavaObject
      extended by org.simantics.databoard.accessor.java.JavaLong
All Implemented Interfaces:
Accessor, LongAccessor

public class JavaLong
extends JavaObject
implements LongAccessor


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.simantics.databoard.accessor.Accessor
Accessor.Listener
 
Constructor Summary
JavaLong(JavaObject parent, LongBinding binding, java.lang.Object object)
           
 
Method Summary
<T extends Accessor>
T
getAccessor(AccessorReference reference)
          Get an accessor to a sub-container.
 LongBinding getBinding()
           
 long getValue()
           
 void setValue(Binding binding, java.lang.Object newValue)
          Set a complete new value to the data container.
 void setValue(long newValue)
           
 LongType type()
          Get structural represtentation of the accessor presented in databoard's type system format.
 
Methods inherited from class org.simantics.databoard.accessor.java.JavaObject
addListener, apply, createAccessor, getObject, getValue, removeListener, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.simantics.databoard.accessor.Accessor
addListener, apply, getValue, removeListener
 

Constructor Detail

JavaLong

public JavaLong(JavaObject parent,
                LongBinding binding,
                java.lang.Object object)
Method Detail

getBinding

public LongBinding getBinding()
Overrides:
getBinding in class JavaObject

type

public LongType type()
Description copied from interface: Accessor
Get structural represtentation of the accessor presented in databoard's type system format.

Specified by:
type in interface Accessor
Specified by:
type in interface LongAccessor
Overrides:
type in class JavaObject
Returns:
type description

getValue

public long getValue()
              throws AccessorException
Specified by:
getValue in interface LongAccessor
Throws:
AccessorException

setValue

public void setValue(long newValue)
              throws AccessorException
Specified by:
setValue in interface LongAccessor
Throws:
AccessorException

setValue

public void setValue(Binding binding,
                     java.lang.Object newValue)
              throws AccessorException
Description copied from interface: Accessor
Set a complete new value to the data container. If the new value removes old map entries, array entries, optional value, or changes union or variant value type, it will disengage any existing sub-accessors and send InvalidatedEvent.

Writing the current value again may not emit an event. This is implementation specific.

Write is durable, once a the method returns successfully the value has been stored in the implmentation.

Specified by:
setValue in interface Accessor
Throws:
AccessorException

getAccessor

public <T extends Accessor> T getAccessor(AccessorReference reference)
                               throws AccessorConstructionException
Description copied from interface: Accessor
Get an accessor to a sub-container. If one already exists, the same is returned, otherwise a new is created.

InvalidatedEvent is thrown from the accessor if it is unlinked from the parent hierarchy.

Specified by:
getAccessor in interface Accessor
Parameters:
reference - component reference or null to return _this_ accessor
Returns:
accessor
Throws:
AccessorConstructionException