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

info.archinnov.achilles.annotations.Table Maven / Gradle / Ivy

There is a newer version: 6.1.0
Show newest version
/*
 * Copyright (C) 2012-2016 DuyHai DOAN
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package info.archinnov.achilles.annotations;

import java.lang.annotation.*;

/**

 * Marks a class as an entity and let Achilles manage it
 * 

 * {@literal @}Table
 * public class UserEntity {...}
 * 
* * @see @Table */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Documented public @interface Table { /** * (Optional) The name of the keyspace in which this table belongs to. * If not set explicitly on the entity, Achilles will use the current * keyspace of the java driver Session object. *
*



     * {@literal @}Table(keyspace="production_data", table = "user")
     * public class UserEntity {...}
     * 
*/ String keyspace() default ""; /** * (Optional) The name of the table. Defaults to the short class name.
* Ex: for the class xxx.xxx.UserEntity, the * default table name will be userentity if the attribute table is not set. *
*


     * {@literal @}Table(table = "user")
     * public class UserEntity {...}
     * 
*/ String table() default ""; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy