2.17.2: 2011-06-17

net.sf.basedb.core
Enum Include

java.lang.Object
  extended by java.lang.Enum<Include>
      extended by net.sf.basedb.core.Include
All Implemented Interfaces:
Serializable, Comparable<Include>

public enum Include
extends Enum<Include>

This enumeration defines constants that are used to specify which items to include in a query.

Version:
2.0
Author:
Nicklas
See Also:
EntityQuery.include(Include[])
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Enum Constant Summary
ANNOTATED
          Include items that have at least one annotation.
IN_PROJECT
          Include items in the active project.
MINE
          Include item owned by the logged in user.
NOT_ANNOTATED
          Include items that have no annotations.
NOT_REMOVED
          Include items flagged as not removed.
OTHERS
          Include items owned by other users.
REMOVED
          Include items flagged as removed.
SHARED
          Include items shared to the logged in user.
 
Field Summary
static Collection<Include> ALL
          A non-modifable collection containing all options.
private  int value
           
 
Method Summary
(package private) static Set<Include> fromInt(int includes)
          Convert an integer value to a set of includes.
private  int getValue()
           
static int toInt(Set<Include> includes)
           
static Include valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Include[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

REMOVED

public static final Include REMOVED
Include items flagged as removed.


NOT_REMOVED

public static final Include NOT_REMOVED
Include items flagged as not removed.


ANNOTATED

public static final Include ANNOTATED
Include items that have at least one annotation.


NOT_ANNOTATED

public static final Include NOT_ANNOTATED
Include items that have no annotations.


MINE

public static final Include MINE
Include item owned by the logged in user.


OTHERS

public static final Include OTHERS
Include items owned by other users. Requires generic read permission for the type of item.


SHARED

public static final Include SHARED
Include items shared to the logged in user.


IN_PROJECT

public static final Include IN_PROJECT
Include items in the active project.

Field Detail

ALL

public static final Collection<Include> ALL
A non-modifable collection containing all options.

Since:
2.5

value

private final int value
Method Detail

values

public static Include[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Include c : Include.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Include valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getValue

private int getValue()

toInt

public static int toInt(Set<Include> includes)

fromInt

static Set<Include> fromInt(int includes)
Convert an integer value to a set of includes.


2.17.2: 2011-06-17