Package org.ivoa.dm.executionbroker
Class IntegerDeltaUpdate
java.lang.Object
org.ivoa.dm.executionbroker.AbstractUpdate
org.ivoa.dm.executionbroker.IntegerDeltaUpdate
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="execbroker:IntegerDeltaUpdate",
role=objectType)
public class IntegerDeltaUpdate
extends AbstractUpdate
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A simple integer delta update. This increments or decrements the target value by the specified amount.
objectType: IntegerDeltaUpdate
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for IntegerDeltaUpdate, mainly for use in the functional builder pattern.Nested classes/interfaces inherited from class org.ivoa.dm.executionbroker.AbstractUpdate
AbstractUpdate.AbstractUpdateBuilder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IntegerThe increment or decrement to apply.protected StringThe units to use for the change.Fields inherited from class org.ivoa.dm.executionbroker.AbstractUpdate
_id, kind, path -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new IntegerDeltaUpdateIntegerDeltaUpdate(Integer delta, String units, String kind, String path) full parameter constructor.IntegerDeltaUpdate(AbstractUpdate superinstance, Integer delta, String units) Constructor from supertype instance.Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncopyMe()make a clone of the object taking into account current polymorhic type.static IntegerDeltaUpdatecreate a IntegerDeltaUpdate in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidgetDelta()Returns delta Attribute.getUnits()Returns units Attribute.voidSet delta Attribute.voidSet units Attribute.voidupdateUsing(IntegerDeltaUpdate other) Update this object with the content of the given object.fluent setter for delta Attribute.fluent setter for units Attribute.Methods inherited from class org.ivoa.dm.executionbroker.AbstractUpdate
createAbstractUpdate, getId, getKind, getPath, setKind, setPath, updateUsing, withKind, withPathMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType
getId
-
Field Details
-
delta
@VoDml(id="execbroker:IntegerDeltaUpdate.delta", role=attribute, type="ivoa:integer", typeRole=primitiveType) protected Integer deltaThe increment or decrement to apply. : Attribute delta : multiplicity 1 -
units
@VoDml(id="execbroker:IntegerDeltaUpdate.units", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String unitsThe units to use for the change. : Attribute units : multiplicity 1
-
-
Constructor Details
-
IntegerDeltaUpdate
public IntegerDeltaUpdate()Creates a new IntegerDeltaUpdate -
IntegerDeltaUpdate
full parameter constructor.- Parameters:
delta- The increment or decrement to apply.units- The units to use for the change.kind- The kind of update.path- The path this update applies to.
-
IntegerDeltaUpdate
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
IntegerDeltaUpdate
Constructor from supertype instance.- Parameters:
superinstance- The supertype.delta- The increment or decrement to apply.units- The units to use for the change.
-
-
Method Details
-
copyMe
make a clone of the object taking into account current polymorhic type.- Overrides:
copyMein classAbstractUpdate- Returns:
- the cloned object.
-
updateUsing
Update this object with the content of the given object. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
getDelta
Returns delta Attribute.- Returns:
- delta Attribute
-
setDelta
Set delta Attribute.- Parameters:
pDelta- value to set
-
withDelta
fluent setter for delta Attribute.- Parameters:
pDelta- value to set- Returns:
- IntegerDeltaUpdate
-
getUnits
Returns units Attribute.- Returns:
- units Attribute
-
setUnits
Set units Attribute.- Parameters:
pUnits- value to set
-
withUnits
fluent setter for units Attribute.- Parameters:
pUnits- value to set- Returns:
- IntegerDeltaUpdate
-
createIntegerDeltaUpdate
public static IntegerDeltaUpdate createIntegerDeltaUpdate(Consumer<IntegerDeltaUpdate.IntegerDeltaUpdateBuilder> f) create a IntegerDeltaUpdate in functional builder style.- Parameters:
f- the functional builder.- Returns:
- an object initialized from the builder.
-
forceLoad
public void forceLoad()- Specified by:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations- Overrides:
forceLoadin classAbstractUpdate
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>- Overrides:
deletein classAbstractUpdate
-