2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.strategy
;
12 import java
.io
.Serializable
;
13 import java
.util
.Collection
;
14 import java
.util
.UUID
;
16 import org
.apache
.log4j
.Logger
;
17 import org
.joda
.time
.DateTime
;
19 import eu
.etaxonomy
.cdm
.model
.agent
.Contact
;
20 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
21 import eu
.etaxonomy
.cdm
.model
.common
.LSID
;
22 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
25 public abstract class StrategyBase
implements IStrategy
, Serializable
{
26 private static final long serialVersionUID
= -274791080847215663L;
27 @SuppressWarnings("unused")
28 private static final Logger logger
= Logger
.getLogger(StrategyBase
.class);
30 final static UUID uuid
= UUID
.fromString("2ff2b1d6-17a6-4807-a55f-f6b45bf429b7");
32 abstract protected UUID
getUuid();
34 protected StrategyBase(){
44 protected static boolean isCollection(Class
<?
> fieldType
) {
45 if (Collection
.class.isAssignableFrom(fieldType
) ){
56 protected boolean isPrimitive(Class
<?
> fieldType
) {
57 if (fieldType
.isPrimitive()){
68 protected boolean isSingleCdmBaseObject(Class
<?
> fieldType
) {
69 if (CdmBase
.class.isAssignableFrom(fieldType
)){
80 protected boolean isUserType(Class
<?
> fieldType
) {
81 if ( fieldType
== TimePeriod
.class ||
82 fieldType
== DateTime
.class ||
83 fieldType
== LSID
.class ||
84 fieldType
== Contact
.class