org.ow2.jonas.lib.ejb21.jorm
Class JormType

java.lang.Object
  extended by org.ow2.jonas.lib.ejb21.jorm.JormType

public class JormType
extends Object

This class contains several methods to manipulate a PType.

Author:
Sebastien Chassande-Barrioz : Initial developper, Helene Joanin

Constructor Summary
JormType()
           
 
Method Summary
static short getCodingType(Class c, boolean isPkField)
          It retrieves a coding type either a Class
static short getCodingType(int typeCode)
          It converts a type code into a coding type.
static short getCodingType(org.objectweb.jorm.type.api.PType pt)
          It converts a PType into a coding type.
static org.objectweb.jorm.type.api.PType getPType(Class cl, boolean isPkField)
          This method converts a java.lang.Class into a jorm PType.
static String getPTypeDef(Class cl, boolean isPkField)
          This method converts a java.lang.Class into a jorm PType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JormType

public JormType()
Method Detail

getPType

public static org.objectweb.jorm.type.api.PType getPType(Class cl,
                                                         boolean isPkField)
This method converts a java.lang.Class into a jorm PType.

Parameters:
cl - is a java.lang.Class
isPkField - true if this is for a field of the primary key, false otherwise
Returns:
The PType which matches the class specified in parameter.

getPTypeDef

public static String getPTypeDef(Class cl,
                                 boolean isPkField)
This method converts a java.lang.Class into a jorm PType.

Parameters:
cl - is a java.lang.Class
isPkField - true if this is for a field of the primary key, false otherwise
Returns:
A String that represents The PType which matches the class.

getCodingType

public static short getCodingType(Class c,
                                  boolean isPkField)
                           throws org.objectweb.jorm.naming.api.PExceptionNaming
It retrieves a coding type either a Class

Parameters:
the - Class
isPkField - true if this is for a field of the primary key, false otherwise
Returns:
a coding type wich matches to one of CTxxx fields of the PNamingcontext interface.
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming - when the class specified is not support in the jorm naming.

getCodingType

public static short getCodingType(org.objectweb.jorm.type.api.PType pt)
                           throws org.objectweb.jorm.naming.api.PExceptionNaming
It converts a PType into a coding type.

Parameters:
a - PType
Returns:
a coding type wich matches to one of CTxxx fields of the PNamingcontext interface.
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming - when the PType specified is not support in the jorm naming.

getCodingType

public static short getCodingType(int typeCode)
                           throws org.objectweb.jorm.naming.api.PExceptionNaming
It converts a type code into a coding type.

Parameters:
a - type code of a PType
Returns:
a coding type wich matches to one of CTxxx fields of the PNamingcontext interface.
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming - when the type code specified is not support in the jorm naming.


Copyright © 2010 OW2 Consortium. All Rights Reserved.