org.xblackcat.sjpu.storage.ann.SqlOptArg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sjpu-dbah Show documentation
Show all versions of sjpu-dbah Show documentation
Service for generating DB access logic in simple way via interfaces and annotations
package org.xblackcat.sjpu.storage.ann;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Mark with the annotation a method parameter to substitute in runtime a part of SQL. Value of the annotation represent an indexed
* argument in SQL query. Indexed argument represented with '{<index>}
' construction. Argument should be String type.
*
* Example:
*
* interface ITestAH extends IAH {
* {@linkplain Sql @SQL}("INSERT INTO `{1}`(`name`) VALUES (?)")
* void addName(@SqlPart(1) String tableName, String name) throws {@linkplain org.xblackcat.sjpu.storage.StorageException StorageException};
* }
*
*
* SqlPart string will replace all references in SQL in runtime.
* 17.02.14 11:21
*
* @author xBlackCat
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER})
public @interface SqlOptArg {
String value();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy