extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/dao/DoNotUse.java

Code
Comments
Other
Rev Date Author Line
5790 13 Dec 19 nicklas 1 package net.sf.basedb.reggie.dao;
5790 13 Dec 19 nicklas 2
5790 13 Dec 19 nicklas 3 import net.sf.basedb.core.Annotatable;
5790 13 Dec 19 nicklas 4 import net.sf.basedb.core.DbControl;
5790 13 Dec 19 nicklas 5
5790 13 Dec 19 nicklas 6 /**
5790 13 Dec 19 nicklas 7   Class for handling information related to items marked with DoNotUse.
5790 13 Dec 19 nicklas 8   
5790 13 Dec 19 nicklas 9   @since 4.25
5790 13 Dec 19 nicklas 10 */
5790 13 Dec 19 nicklas 11 public class DoNotUse 
5790 13 Dec 19 nicklas 12 {
5790 13 Dec 19 nicklas 13
5790 13 Dec 19 nicklas 14
5790 13 Dec 19 nicklas 15   /**
5790 13 Dec 19 nicklas 16     Helper method to copy all DoNotUse-related annotations from one item to another.
5790 13 Dec 19 nicklas 17      @param force TRUE to overwrite existing annotations, FALSE to not
5790 13 Dec 19 nicklas 18      @return TRUE if any of the information was changed, FALSE if not
5790 13 Dec 19 nicklas 19      @since 4.25
5790 13 Dec 19 nicklas 20   */
5790 13 Dec 19 nicklas 21   public static boolean copyDoNotUseAnnotations(DbControl dc, Annotatable from, Annotatable to, boolean force)
5790 13 Dec 19 nicklas 22   {
5790 13 Dec 19 nicklas 23     boolean copiedFlag = Annotationtype.DO_NOT_USE.copyAnnotationValues(dc, from, to, force);
5790 13 Dec 19 nicklas 24     boolean copiedComment = Annotationtype.DO_NOT_USE_COMMENT.copyAnnotationValues(dc, from, to, force);
5790 13 Dec 19 nicklas 25     return copiedFlag || copiedComment;
5790 13 Dec 19 nicklas 26   }
5790 13 Dec 19 nicklas 27
5790 13 Dec 19 nicklas 28 }