public class Codes extends AbstractImpl
Modifier and Type | Class and Description |
---|---|
static class |
Codes.AggregateFunction
AggregateFunction.
|
static class |
Codes.BooleanOperator
BooleanOperator.
|
class |
Codes.SequenceBasedValueRangeProvider
SequenceBasedValueRangeProvider
|
static interface |
Codes.ValueRangeProvider
ValueProvider
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BATCH_SIZE |
Modifier | Constructor and Description |
---|---|
protected |
Codes()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
evaluateCondition(ValidatorCondition condition,
org.openmdx.base.jmi1.ContextCapable object,
java.util.Date validationTime,
java.util.List<java.lang.String> selectors,
java.util.List<ValidatorCondition> includes,
java.util.List<ValidatorCondition> excludes,
java.lang.StringBuffer statusMessage)
Return true if object matches condition.
|
Segment |
getCodeSegment(javax.jdo.PersistenceManager pm,
java.lang.String providerName,
java.lang.String segmentName)
Get code segment.
|
java.lang.String |
getDefaultUpdateValuesQuery(ValueRange valueRange)
Get default query so that it selects objects to be updated for given valueRange.
|
static Codes |
getInstance()
Get Codes backend instance.
|
java.lang.Object |
getValue(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object,
java.lang.String feature,
Codes.ValueRangeProvider valueRangeProvider)
Get value for given feature.
|
Codes.ValueRangeProvider |
getValueRangeProvider(ValueRange valueRange)
Get value provider for given value range.
|
javax.jdo.Query |
newUpdateValuesQuery(ValueRange valueRange)
New query so that selects objects to be updated for given valueRange.
|
static void |
register()
Register Codes backend instance.
|
protected java.math.BigDecimal |
toBigDecimal(java.lang.Object value)
Convert value to BigDecimal.
|
void |
updateValue(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object,
ValueRange valueRange,
Codes.ValueRangeProvider valueRangeProvider)
Set formatted value at given storagePath.
|
ValueRangeUpdateValuesResult |
updateValues(SequenceBasedValueRange valueRange,
java.lang.Integer batchSize)
updateValues() performs the following steps:
Retrieve all objects of the extent ordered by createdAt not having a value at ::storagePath
For each of these objects get a value from the value provider
Format the value and save it to object's ::storagePath
update nextValue
|
ValidateObjectResult |
validateObject(ObjectValidator objectValidator,
org.openmdx.base.jmi1.ContextCapable object,
java.util.Date validationTime,
java.util.List<java.lang.String> selectors,
java.util.List<ValidatorCondition> includes,
java.util.List<ValidatorCondition> excludes)
Validate given object.
|
getInstance, getPersistenceManager, getUidAsString, preDelete, preStore, registerImpl
public static final int DEFAULT_BATCH_SIZE
public static void register()
public static Codes getInstance() throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
public Segment getCodeSegment(javax.jdo.PersistenceManager pm, java.lang.String providerName, java.lang.String segmentName)
pm
- providerName
- segmentName
- public Codes.ValueRangeProvider getValueRangeProvider(ValueRange valueRange) throws org.openmdx.base.exception.ServiceException
valueRange
- org.openmdx.base.exception.ServiceException
public java.lang.String getDefaultUpdateValuesQuery(ValueRange valueRange) throws org.openmdx.base.exception.ServiceException
valueRange
- org.openmdx.base.exception.ServiceException
public javax.jdo.Query newUpdateValuesQuery(ValueRange valueRange) throws org.openmdx.base.exception.ServiceException
query
- org.openmdx.base.exception.ServiceException
public java.lang.Object getValue(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object, java.lang.String feature, Codes.ValueRangeProvider valueRangeProvider) throws org.openmdx.base.exception.ServiceException
object
- feature
- nextValue
- date
- org.openmdx.base.exception.ServiceException
public void updateValue(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object, ValueRange valueRange, Codes.ValueRangeProvider valueRangeProvider) throws org.openmdx.base.exception.ServiceException
object
- storagePath
- format
- arguments
- value
- org.openmdx.base.exception.ServiceException
public ValueRangeUpdateValuesResult updateValues(SequenceBasedValueRange valueRange, java.lang.Integer batchSize) throws org.openmdx.base.exception.ServiceException
valueRange
- batchSize
- org.openmdx.base.exception.ServiceException
protected java.math.BigDecimal toBigDecimal(java.lang.Object value)
value
- public java.lang.Boolean evaluateCondition(ValidatorCondition condition, org.openmdx.base.jmi1.ContextCapable object, java.util.Date validationTime, java.util.List<java.lang.String> selectors, java.util.List<ValidatorCondition> includes, java.util.List<ValidatorCondition> excludes, java.lang.StringBuffer statusMessage) throws org.openmdx.base.exception.ServiceException
condition
- object
- validationTime
- org.openmdx.base.exception.ServiceException
public ValidateObjectResult validateObject(ObjectValidator objectValidator, org.openmdx.base.jmi1.ContextCapable object, java.util.Date validationTime, java.util.List<java.lang.String> selectors, java.util.List<ValidatorCondition> includes, java.util.List<ValidatorCondition> excludes) throws org.openmdx.base.exception.ServiceException
objectValidator
- validationTime
- org.openmdx.base.exception.ServiceException
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.