Class ByteArrayRef
- java.lang.Object
-
- org.flowable.common.engine.impl.persistence.entity.ByteArrayRef
-
- All Implemented Interfaces:
Serializable
public class ByteArrayRef extends Object implements Serializable
Encapsulates the logic for transparently working with
ByteArrayEntity.- Author:
- Marcus Klimstra (CGI)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutorcommandExecutorprotected booleandeleted
-
Constructor Summary
Constructors Constructor Description ByteArrayRef()ByteArrayRef(String id, CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringasString(String engineType)ByteArrayRefcopy()This makes a copy of thisByteArrayRef: a newByteArrayRefinstance will be created, however with the same id, name andByteArrayEntityinstances.voiddelete(String engineType)protected voidensureInitialized(String engineType)byte[]getBytes(String engineType)protected AbstractEngineConfigurationgetEngineConfiguration(String engineType)protected AbstractEngineConfigurationgetEngineConfiguration(String engineType, CommandContext commandContext)protected AbstractEngineConfigurationgetEngineConfigurationForAllType(CommandContext commandContext)ByteArrayEntitygetEntity(String engineType)protected AbstractEngineConfigurationgetFirstEngineConfigurationWithByteArrayEntityManager(CommandContext commandContext)StringgetId()StringgetName()booleanisDeleted()protected voidsetBytes(byte[] bytes, String engineType)voidsetValue(String name, byte[] bytes, String engineType)voidsetValue(String name, String value, String engineType)Set the specifiedStringas the value of the byte array reference.StringtoString()
-
-
-
Field Detail
-
commandExecutor
protected CommandExecutor commandExecutor
-
deleted
protected boolean deleted
-
-
Constructor Detail
-
ByteArrayRef
public ByteArrayRef()
-
ByteArrayRef
public ByteArrayRef(String id, CommandExecutor commandExecutor)
-
-
Method Detail
-
getId
public String getId()
-
getName
public String getName()
-
getBytes
public byte[] getBytes(String engineType)
-
asString
public String asString(String engineType)
- Returns:
- the byte array as
StandardCharsets.UTF_8String
-
setValue
public void setValue(String name, String value, String engineType)
Set the specifiedStringas the value of the byte array reference. It uses theStandardCharsets.UTF_8charset to convert theStringto the byte array.- Parameters:
name- the name of the byte array referencevalue- the value of the byte array reference
-
setBytes
protected void setBytes(byte[] bytes, String engineType)
-
getEntity
public ByteArrayEntity getEntity(String engineType)
-
delete
public void delete(String engineType)
-
ensureInitialized
protected void ensureInitialized(String engineType)
-
isDeleted
public boolean isDeleted()
-
copy
public ByteArrayRef copy()
This makes a copy of thisByteArrayRef: a newByteArrayRefinstance will be created, however with the same id, name andByteArrayEntityinstances.
-
getEngineConfiguration
protected AbstractEngineConfiguration getEngineConfiguration(String engineType)
-
getEngineConfiguration
protected AbstractEngineConfiguration getEngineConfiguration(String engineType, CommandContext commandContext)
-
getEngineConfigurationForAllType
protected AbstractEngineConfiguration getEngineConfigurationForAllType(CommandContext commandContext)
-
getFirstEngineConfigurationWithByteArrayEntityManager
protected AbstractEngineConfiguration getFirstEngineConfigurationWithByteArrayEntityManager(CommandContext commandContext)
-
-