All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xblackcat.sjpu.storage.ann.SqlOptArg Maven / Gradle / Ivy

Go to download

Service for generating DB access logic in simple way via interfaces and annotations

There is a newer version: 2.0
Show newest version
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