Class PrepareEntityCommand
java.lang.Object
com.ptc.core.command.common.bean.AbstractCommand
com.ptc.core.command.common.bean.AbstractServerCommand
com.ptc.core.command.common.bean.entity.AbstractEntityCommand
com.ptc.core.command.common.bean.entity.PrepareEntityCommand
- All Implemented Interfaces:
Command,com.ptc.core.command.common.ServerCommand,Externalizable,Serializable
public class PrepareEntityCommand
extends com.ptc.core.command.common.bean.entity.AbstractEntityCommand
implements Externalizable
This command can be used to prepare one or more source objects(
Supported API: true
Extendable: true
TypeInstance)
for further processing. The preparation required is identified by the
nextOperation property of the filter AttributeContainerSpec
or by specialization of this class.
The object returned result may or may not represent a persisted object as this command can prepare templates for new object creation or for performing searches for persistent entities.
Supported API: true
Extendable: true
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetSource(TypeIdentifier identifier) Sets the source [or input] of the command to the givenTypeIdentifier.voidsetSource(TypeIdentifier identifier, AttributeContainer instanceData) Sets the source [or input] of the command to the givenTypeIdentifier.voidsetSource(TypeInstanceIdentifier instanceId) Sets the source [or input] of the command to the givenTypeInstanceIdentifier.voidsetSource(TypeInstanceIdentifier instanceId, AttributeContainer instanceData) Sets the source [or input] of the command to the givenTypeInstanceIdentifier.voidsetSource(TypeInstance instance) Sets the source [or input] of the command to the givenTypeInstance.voidsetSources(TypeInstanceIdentifier[] instanceIds) Sets the sources [or inputs] of the command to the givenTypeInstanceIdentifier[].
-
Constructor Details
-
PrepareEntityCommand
public PrepareEntityCommand()
Supported API: true
-
-
Method Details
-
setSource
public void setSource(TypeInstanceIdentifier instanceId) throws WTPropertyVetoException, UnsupportedOperationException Sets the source [or input] of the command to the givenTypeInstanceIdentifier. The outcome of this is that the object represented by theTypeInstanceIdentifieris prepared based upon the filter and returned as aTypeInstance.
Supported API: true- Overrides:
setSourcein classcom.ptc.core.command.common.bean.entity.AbstractEntityCommand- Parameters:
instanceId-- Throws:
WTPropertyVetoExceptionUnsupportedOperationException
-
setSource
public void setSource(TypeInstance instance) throws WTPropertyVetoException, UnsupportedOperationException Sets the source [or input] of the command to the givenTypeInstance. If theTypeInstancerepresents an already persistent instance, a fresh copy is returned from persistent storage. Any attributes on the suppliedTypeInstanceare treated as initial values on the returnedTypeInstance, assuming that the attributes are represented in the supplied filter.
Supported API: true- Overrides:
setSourcein classcom.ptc.core.command.common.bean.entity.AbstractEntityCommand- Parameters:
instance-- Throws:
WTPropertyVetoExceptionUnsupportedOperationException
-
setSource
public void setSource(TypeInstanceIdentifier instanceId, AttributeContainer instanceData) throws WTPropertyVetoException, UnsupportedOperationException Sets the source [or input] of the command to the givenTypeInstanceIdentifier. The command result represents a refreshed copy of the object identified by theTypeInstanceIdentifier. If thenextOperationidentified in the filter is some form of creation, theAttributeContainercan be used to supply initial values.
Supported API: true- Overrides:
setSourcein classcom.ptc.core.command.common.bean.entity.AbstractEntityCommand- Parameters:
instanceId-instanceData-- Throws:
WTPropertyVetoExceptionUnsupportedOperationException
-
setSource
public void setSource(TypeIdentifier identifier, AttributeContainer instanceData) throws WTPropertyVetoException, UnsupportedOperationException Sets the source [or input] of the command to the givenTypeIdentifier. The command result represents a instance of the specifiedTypeIdentifierbased upon thenextOperationspecified in theAttributeContainerSpecfilter. This method is typically used in some form of creation or search when an existing instance is not required. The suppliedAttributeContainercan be used to supply initial values that are populated in the returned instance.
Supported API: true- Parameters:
identifier-instanceData-- Throws:
WTPropertyVetoExceptionUnsupportedOperationException
-
setSource
public void setSource(TypeIdentifier identifier) throws WTPropertyVetoException, UnsupportedOperationException Sets the source [or input] of the command to the givenTypeIdentifier. The command result represents a instance of the specifiedTypeIdentifierbased upon thenextOperationspecified in theAttributeContainerSpecfilter. This method is typically used in some form of creation or search when an existing instance is not required.
Supported API: true- Parameters:
identifier-- Throws:
WTPropertyVetoExceptionUnsupportedOperationException
-
setSources
Sets the sources [or inputs] of the command to the givenTypeInstanceIdentifier[]. The outcome of this is that the objects represented by theTypeInstanceIdentifier[]are prepared based upon the filter and returned as aTypeInstance[].
Supported API: true- Parameters:
instanceIds-
-