com.fasterxml.jackson.annotation.ObjectIdGenerators Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ehcache Show documentation
Show all versions of ehcache Show documentation
Ehcache is an open source, standards-based cache used to boost performance,
offload the database and simplify scalability. Ehcache is robust, proven and full-featured and
this has made it the most widely-used Java-based cache.
package com.fasterxml.jackson.annotation;
import java.util.UUID;
/**
* Container class for standard {@link ObjectIdGenerator} implementations.
*/
public class ObjectIdGenerators
{
/*
/**********************************************************
/* Shared base class for concrete implementations
/**********************************************************
*/
/**
* Helper class for implementations contained.
*/
@SuppressWarnings("serial")
private abstract static class Base extends ObjectIdGenerator
{
protected final Class> _scope;
protected Base(Class> scope) {
_scope = scope;
}
@Override
public final Class> getScope() {
return _scope;
}
@Override
public boolean canUseFor(ObjectIdGenerator> gen) {
return (gen.getClass() == getClass()) && (gen.getScope() == _scope);
}
@Override
public abstract T generateId(Object forPojo);
}
/*
/**********************************************************
/* Implementation classes
/**********************************************************
*/
/**
* Abstract marker class used to allow explicitly specifying
* that no generator is used; which also implies that no
* Object Id is to be included or used.
*/
@SuppressWarnings("serial")
public abstract static class None extends ObjectIdGenerator