
com.toshiba.mwcloud.gs.RowField Maven / Gradle / Ivy
Show all versions of gridstore Show documentation
/*
Copyright (c) 2017 TOSHIBA Digital Solutions Corporation
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 com.toshiba.mwcloud.gs;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Sets options for mapping Row fields of a {@link Container}.
*
* Applicable to each Row field that configures a composite Row key,
* but not applicable to the field method for setting and getting the entire
* composite Row key as one object.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD})
public @interface RowField {
/**
* Sets the name to be used as a Column name.
*
* If an empty string is specified, the Column name is determined based on the corresponding field name or
* method name.
*/
String name() default "";
/**
* Sets a Column number.
*
* To specify the location of a Column explicitly, specify {@code 0} or more
* and less than the number of Columns. Duplicate Column numbers cannot be
* specified in a single Container. In the current version, a Row key must be
* always assigned to the first Column. If the default value {@code -1} is
* specified, the corresponding Column number is automatically determined.
*
* For the Row object with a composite Row key when setting a number for
* a Row field other than the Row key, make sure that the number does not
* overlap with the number assigned to each column that configures the
* composite Row key.
*/
int columnNumber() default -1;
}