org.springframework.data.mapping.context
Class MappingContextIsNewStrategyFactory
java.lang.Object
org.springframework.data.support.IsNewStrategyFactorySupport
org.springframework.data.mapping.context.MappingContextIsNewStrategyFactory
- All Implemented Interfaces:
- IsNewStrategyFactory
public class MappingContextIsNewStrategyFactory
- extends IsNewStrategyFactorySupport
An 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.
- Author:
- Oliver Gierke
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MappingContextIsNewStrategyFactory
public MappingContextIsNewStrategyFactory(MappingContext<? extends PersistentEntity<?,?>,?> context)
- Creates a new
MappingContextIsNewStrategyFactory
using the given MappingContext
.
- Parameters:
context
- must not be null.
doGetIsNewStrategy
protected IsNewStrategy doGetIsNewStrategy(Class<?> type)
- Description copied from class:
IsNewStrategyFactorySupport
- Determine the actual
IsNewStrategy
to be used for the given type.
- Specified by:
doGetIsNewStrategy
in class IsNewStrategyFactorySupport
- Parameters:
type
- will never be null.
- Returns:
- the
IsNewStrategy
to be used for the given type or null in case none can be resolved.
Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.