com.smartgwt.client.types
Enum DSServerType

java.lang.Object
  extended by java.lang.Enum<DSServerType>
      extended by com.smartgwt.client.types.DSServerType
All Implemented Interfaces:
ValueEnum, Serializable, Comparable<DSServerType>

public enum DSServerType
extends Enum<DSServerType>
implements ValueEnum

Indicates what the ISC server will do with a DataSource request if you call dsRequest.execute() in server code.

If you use a Java-based persistence layer not provided by SmartClient, such as Hibernate, EJB or your own custom object model, you don't need to set dataSource.serverType and should follow the 'integration instructions'.

If you want to use the SmartGWT SQL engine for persistence, set dataSource.serverType to "sql", and see the instructions on SqlDataSource.


Enum Constant Summary
GENERIC
          Throws an error if dsRequest.execute() is called.
HIBERNATE
          Saves via Hibernate, by automatically generating a Hibernate configuration based on a SmartClient DataSource file (dataSourceID.ds.xml).
SQL
          Uses SmartGWT's 'built-in SQL connectors' to talk to relational databases.
 
Method Summary
 String getValue()
           
static DSServerType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DSServerType[] 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

HIBERNATE

public static final DSServerType HIBERNATE
Saves via Hibernate, by automatically generating a Hibernate configuration based on a SmartClient DataSource file (dataSourceID.ds.xml). See HibernateIntegration for details.


SQL

public static final DSServerType SQL
Uses SmartGWT's 'built-in SQL connectors' to talk to relational databases. You can use this if your DataSource connects to a relational database table.


GENERIC

public static final DSServerType GENERIC
Throws an error if dsRequest.execute() is called. This is appropriate if you intend an entirely custom implementation, and you want an error thrown if there is an attempt to call an operation you have not implemented.

Method Detail

values

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

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

valueOf

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

public String getValue()
Specified by:
getValue in interface ValueEnum