public class MappingContextIsNewStrategyFactory extends IsNewStrategyFactorySupport
IsNewStrategyFactory
using a MappingContext
to determine the IsNewStrategy
to be returned
for a particular type. It will look for a version and id property on the PersistentEntity
and return a
strategy instance that will refelctively inspect the property for null values or null or a
value of 0 in case of a version property.Constructor and Description |
---|
MappingContextIsNewStrategyFactory(MappingContext<? extends PersistentEntity<?,?>,?> context)
Deprecated.
|
MappingContextIsNewStrategyFactory(PersistentEntities entities)
Creates a new
MappingContextIsNewStrategyFactory using the given PersistentEntities . |
Modifier and Type | Method and Description |
---|---|
protected IsNewStrategy |
doGetIsNewStrategy(Class<?> type)
Determine the actual
IsNewStrategy to be used for the given type. |
getIsNewStrategy
@Deprecated public MappingContextIsNewStrategyFactory(MappingContext<? extends PersistentEntity<?,?>,?> context)
MappingContextIsNewStrategyFactory(PersistentEntities)
instead.MappingContextIsNewStrategyFactory
using the given MappingContext
.context
- must not be null.public MappingContextIsNewStrategyFactory(PersistentEntities entities)
MappingContextIsNewStrategyFactory
using the given PersistentEntities
.context
- must not be null.protected IsNewStrategy doGetIsNewStrategy(Class<?> type)
IsNewStrategyFactorySupport
IsNewStrategy
to be used for the given type.doGetIsNewStrategy
in class IsNewStrategyFactorySupport
type
- will never be null.IsNewStrategy
to be used for the given type or null in case none can be resolved.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.