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)
Creates a new
MappingContextIsNewStrategyFactory using the given MappingContext . |
Modifier and Type | Method and Description |
---|---|
protected IsNewStrategy |
doGetIsNewStrategy(Class<?> type)
Determine the actual
IsNewStrategy to be used for the given type. |
getIsNewStrategy
public MappingContextIsNewStrategyFactory(MappingContext<? extends PersistentEntity<?,?>,?> context)
MappingContextIsNewStrategyFactory
using the given MappingContext
.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-2013-2014 Pivotal. All Rights Reserved.