001 /* 002 * Cumulus4j - Securing your data in the cloud - http://cumulus4j.org 003 * Copyright (C) 2011 NightLabs Consulting GmbH 004 * 005 * This program is free software: you can redistribute it and/or modify 006 * it under the terms of the GNU Affero General Public License as 007 * published by the Free Software Foundation, either version 3 of the 008 * License, or (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU Affero General Public License for more details. 014 * 015 * You should have received a copy of the GNU Affero General Public License 016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 017 */ 018 package org.cumulus4j.store.model; 019 020 import java.util.Collection; 021 import java.util.List; 022 import java.util.Set; 023 import java.util.Map; 024 025 /** 026 * Enum for the {@link FieldMeta#getRole() role} of a {@link FieldMeta}. 027 * @author Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de 028 */ 029 public enum FieldMetaRole 030 { 031 /** 032 * Only those {@link FieldMeta} instances with this role are registered in {@link ClassMeta} directly. 033 * All others are registered as sub-FieldMeta. 034 */ 035 primary, 036 037 /** 038 * Sub-field (aka part of a real field) used when the primary field is of type {@link Collection} 039 * (or a sub-type like {@link List}, {@link Set} etc.). 040 */ 041 collectionElement, 042 043 /** 044 * Sub-field (aka part of a real field) used when the primary field is an array. 045 */ 046 arrayElement, 047 048 /** 049 * Sub-field (aka part of a real field) used when the primary field is of type {@link Map} 050 * and this sub-field is the <code>Map</code>'s key. 051 */ 052 mapKey, 053 054 /** 055 * Sub-field (aka part of a real field) used when the primary field is of type {@link Map} 056 * and this sub-field is the <code>Map</code>'s value. 057 */ 058 mapValue 059 }