View Javadoc

1   /***
2    * License Agreement.
3    * 
4    * JSPA (POJO-SP)
5    * 
6    * Copyright (C) 2009 HRX Pty Ltd
7    * 
8    * This file is part of JSPA.
9    * 
10   * JSPA is free software: you can redistribute it and/or modify it under the
11   * terms of the GNU Lesser General Public License version 3 as published by the
12   * Free Software Foundation.
13   * 
14   * JSPA is distributed in the hope that it will be useful, but WITHOUT ANY
15   * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16   * A PARTICULAR PURPOSE. See the Lesser General Public License for more details.
17   * 
18   * You should have received a copy of the GNU Lesser General Public License
19   * along with JSPA. If not, see <http://www.gnu.org/licenses/>.
20   */
21  package com.hrx.rasp.util.dao.annotations;
22  
23  import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
24  import static java.lang.annotation.ElementType.FIELD;
25  
26  import java.lang.annotation.Retention;
27  import java.lang.annotation.RetentionPolicy;
28  import java.lang.annotation.Target;
29  
30  import com.hrx.rasp.util.dao.operation.OperationType;
31  
32  /***
33   * A generic annotation representing a stored procedure or a function that
34   * executes a DAO operation
35   * 
36   * @author dan.stoica <dan.stoica@acslink.net.au>
37   * 
38   */
39  @Target(
40  {
41  		ANNOTATION_TYPE, FIELD
42  })
43  @Retention(RetentionPolicy.RUNTIME)
44  public @interface Operation
45  {
46  	OperationType type();
47  
48  	String name();
49  
50  	int errorCodeIndex() default 0;
51  
52  	int errorMessageIndex() default 0;
53  }