org.springframework.roo.classpath.layers
Enum LayerType

java.lang.Object
  extended by java.lang.Enum<LayerType>
      extended by org.springframework.roo.classpath.layers.LayerType
All Implemented Interfaces:
Serializable, Comparable<LayerType>

public enum LayerType
extends Enum<LayerType>

Typical layers within a user application. Roo is not limited to these layers alone; layer-providing addons can specify any desired integer position in order to appear in the correct part of the application architecture relative to the core position values shown below.

Since:
1.2.0
Author:
Stefan Schmidt

Enum Constant Summary
ACTIVE_RECORD
          The pattern by which entities provide their own persistence methods.
DAO
          Infrastructure component that provides low-level persistence operations, e.g. to a single table of a relational database.
HIGHEST
          The ultimate consumer of persistence-related operations, for example the application's web or integration test layer.
REPOSITORY
          Domain type that provides collection-like access to instances of aggregate roots; implementations are usually persistence agnostic.
SERVICE
          Domain type that implements an application's use-cases.
 
Method Summary
 int getPosition()
          Returns the position of this layer relative to other layers
static LayerType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LayerType[] 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

ACTIVE_RECORD

public static final LayerType ACTIVE_RECORD
The pattern by which entities provide their own persistence methods.


DAO

public static final LayerType DAO
Infrastructure component that provides low-level persistence operations, e.g. to a single table of a relational database. Usually implemented via a specific persistence technology such as JPA or JDBC.


HIGHEST

public static final LayerType HIGHEST
The ultimate consumer of persistence-related operations, for example the application's web or integration test layer.


REPOSITORY

public static final LayerType REPOSITORY
Domain type that provides collection-like access to instances of aggregate roots; implementations are usually persistence agnostic.


SERVICE

public static final LayerType SERVICE
Domain type that implements an application's use-cases.

Method Detail

values

public static LayerType[] 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 (LayerType c : LayerType.values())
    System.out.println(c);

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

valueOf

public static LayerType 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

getPosition

public int getPosition()
Returns the position of this layer relative to other layers

Returns:
any integer


Copyright © 2009–2015. All rights reserved.