Enum type class hierarchy.

Hi,
I was reviewing and eagerly testing the Typesafe Enum Facility (enum types) on 1.5.0 beta, which is still in Public Review in the JCP (JSR-201).
I would would like to mention a missing feature that I find usefull and powerfull for a custom framework architecture.
I understand and agree with respect to the first question on the JSR 201 FAQ, about subclassing enums.
Having enumeration constants from both the superclass and the subclass is quite confusing and I agree with disallowing it from the language.
But I miss the ability to inherit custom behavior (methods, and not enumeration constants), for an enum type, from a middle superclass. This middle superclass could be a base class for enum types within a specific development framework (and of course, java.lang.Enum would by in is class hierachy).
The actual proposal allows for an enum type to only have java.lang.Enum as superclass, from which it inherits methods like name() and ordinal(). But in a proyect where a large number of diferent enum types with a common and custom extra framework behavior (like a localizedName() or propertyKey() method for example) would need the implementation of this behavior in each enum type source code (or in a helper class).
Following the example above, the actual proposal would need the following coding in order to add an additional behavior to all (or some) of the enum types in a development proyect:
public interface MyBaseFrameworkEnum {
     String localizedName();
     String propertyKey();
public enum FooEnum implements MyBaseFrameworkEnum {
     FOO_A, FOO_B;
     public String localizedName() {
          //..... coding necesary in every enum implementing BaseFrameworkEnum
     public String propertyKey() {
          //..... coding necesary in every enum implementing BaseFrameworkEnum
As you see, every enum type in my example framework (like FooEnum) would need to code both methods localizedName() and propertyKey() which would produce a lack of centralized code and increase of class file size.
It would be very powerfull to be able to use the following coding:
public abstract enum MyBaseFrameworkEnum {
     public String localizedName() {
          //..... coding centralized
     public String propertyKey() {
          //..... coding centralized
public enum FooEnum extends MyBaseFrameworkEnum {
     FOO_A, FOO_B;
As you see, with this abstract enum MyBaseFrameworkEnum (which does not falls in the subclassing problem mentioned in the FAQ) does not define enum constants and will pass its custom behavior to its subclass enums. thus centralizing the related code.
I generally use an implementation of the Typesafe Enum Pattern so I really am looking forward for this new Typesafe Enum Facility in the Java language. But, as an example, I generally use common features in my enums, a properyKey() method used to get a unique key in order to internationalize my applications, since a description to enums is normally needed to be displayed to users.
I believe this capability would be very powerfull in cases where common features are needed for enums in a development proyect with respect of:
- code centralization and maintainance.
- class file size.
- source code readability.
This extension would not contradict the actual definition, it would only allow for an enum type to be able to extend from another abstract enum type which has no enumeration constants.
I believe that if there are other programmers that find this extension worth, it could make it in the JSR-201(which is in public review until February 21th) process before the final specification.
Regards,
Luis Longeri

It would be very powerfull to be able to use the
following coding:
public abstract enum MyBaseFrameworkEnum {
     public String localizedName() {
          //..... coding centralized
     public String propertyKey() {
          //..... coding centralized
public enum FooEnum extends MyBaseFrameworkEnum {
     FOO_A, FOO_B;
}Luis, I like your idea but don't really like the idea of an abstract enum. I think this would be better
public class MyBaseFrameworkEnum extends Enum {
     public String localizedName() {
          //..... coding centralized
     public String propertyKey() {
          //..... coding centralized
public enum FooEnum extends MyBaseFrameworkEnum {
     FOO_A, FOO_B;
}However, this always opens up the risk of you breaking the enum specific stuff, so all the vulnerable Enum methods would need to be declared "final".
Because you are unlikely to see this in the language any time soon (if at all), you can always centralise your code in some static methods that take the enum as an argument
public class MyBaseFrameworkEnumTools {
     public String localizedName(Enum e) {
          //..... coding centralized
     public String propertyKey(Enum e) {
          //..... coding centralized

Similar Messages

  • Query on conversion between String to Enum type

    Hi All,
    I would like to get advice on how to convert between char and Enum type. Below is an example of generating unique random alphabet letters before converting them back to their corresponding letters that belonged to enum type called definition.Alphabet, which is part of a global project used by other applications:
    package definition;
    public enum Alphabet
    A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S,
    T, U, V, W, X, Y, Z
    public StringBuffer uniqueRandomAlphabet()
    String currentAlphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    StringBuffer randomAlphabetSB = new StringBuffer();
    for (int numberOfAlphabet=26; numberOfAlphabet>0; numberOfAlphabet--)
    int character=(int)(Math.random()* numberOfAlphabet);
    String characterPicked = currentAlphabet.substring(character, character+1);
    // System.out.println(characterPicked);
    randomAlphabetSB.append(characterPicked);
    StringBuffer remainingAlphabet = new StringBuffer( currentAlphabet.length() );
    remainingAlphabet.setLength( currentAlphabet.length() );
    int current = 0;
    for (int currentAlphabetIndex = 0; currentAlphabetIndex < currentAlphabet.length(); currentAlphabetIndex++)
    char cur = currentAlphabet.charAt(currentAlphabetIndex);
    if (cur != characterPicked.charAt(0))
    remainingAlphabet.setCharAt( current++, cur );
    currentAlphabet = remainingAlphabet.toString();
    return randomAlphabetSB;
    // System.out.println(randomAlphabetSB);
    I got the following compilation error when trying to pass (Alphabet) StringBuffer[0] to a method that expects Alphabet.A type:
    inconvertible types
    required: definition.Alphabet
    found: char
    Any ideas on how to get around this. An alternative solution is to have a huge switch statement to assemble Alphabet type into an ArrayList<Alphabet>() but wondering whether there is a more shorter direct conversion path.
    I am using JDK1.6.0_17, Netbeans 6.7 on Windows XP.
    Thanks a lot,
    Jack

    I would like to get advice on how to convert between char and Enum type. Below is an example of generating unique random alphabet lettersIf I understand well, you may be interested in method shuffle(...) in class java.util.Collections, which randomly reorders a list.
    before converting them back to their corresponding letters that belonged to enum type called definition.AlphabetIf I understand well, you may be interested in the built-in method Alphabet.valueOf(...) which will return the appropriate instance by name (you'll probably have no problem to build a valid String name from a lowercase char).

  • Overriding an enum type?

    Hi Java experts,
    I would appreciate some help about a small problem I have with some java code of my own. I'm using Java 1.5. I currently have written a class that takes a filename and extract records from a corresponding binary file. The structure of the file is known and is stored in a enum:
    public class ParseFile  {
        private static enum TicketField {
            FieldA(1, FieldType.TYPE_INT),
            FieldB(1, FieldType.TYPE_INT),
            FieldC(2, FieldType.TYPE_STRING),
            // Stores number of fields in record. BTW is this the right way to do it ?
            public static final int numberOfElements = TicketField.values().length;
            // Length of field in bytes.
            private int size;
            // Type of field, enumerated.
            private FieldType type;
            // Constructor.
            TicketField(int size, FieldType type) {
                this.size = size;
                this.type = type;
        public ARRAY fetchRows(String filename) {
        // Create a new row structure.
        Vector<Object> row = new Vector<Object>(TicketField.numberOfElements);
        // Extract rows according to definition of fields above.
        blah blah
        }With this code I can call fetchRows('my_file') and get the list of records in it. Now I would like to extend this piece of code to be able to process different types of files, with different number of fields, different fields definitions, etc; however the extraction algorithm, once the file structure is given, remains the same. I would eg call fetchRows('my_file_cll', type='cll'), fetchRows('my_file_cat', type='cat'), etc. The structure of the returned resultsets would differ btw.
    So conceptually I would like to subclass ParseFile, overriding not the method (fetchRows) but the enum... I can't think of a way to do this. Is it possible to define a kind of "abstract enum" that would be used in the code but instanciated only in a subclass? Otherwise is there a neat way to obtain this result in Java, avoiding to duplicate the code n times?
    Thanks for your help,
    Chris

    Maybe something on the lines ofpublic class EnumFieldTest<E extends Enum<E>>     {
      private final Enum<E>[] myEnum;
      public EnumFieldTest(Enum<E>[] myEnum) {
        this.myEnum = myEnum;
      public void printEnumValues() {
        for (Enum<E> enum1 : myEnum) {
          System.out.println(enum1);
      public static void main(String[] args) {
        new EnumFieldTest<TicketField>(TicketField.values()).printEnumValues();
    enum TicketField {
      FieldA, FieldB, FieldC
    }db

  • Class hierarchy in BW

    Hi,
    has anyone used R/3 class hierarchy in BW reports? I would like to use classification system in R/3 to build up class hierarchies both for material and customers and use those in BW reports. At this point of time I would only be using classes without any characteristics.
    Any help highly appreciated.
    BR. Antti

    Hi rakesh,
    i am also working on the retail, also working on the same hierarchy 0material the data source is 0material-lkls_hier, the calss type is 026,
    but its not updating into the infoobject currectly
    in the monitoring i am gettinh like this
    Transfer rules ( 911 Records ) : No errors
    Hierarchies for master data received. Processing being started.
    Transfer 911 data records in communication structure
    Update ( 0 new / 0 changed ) : No errors
    Data saved successfully
    Data successfully transferred to the update
    -> Start update of master data hierarchy
    <- End update of master data hierarchy
    Hierarchy successfully activated
    but in the bex its displaying like not assigned material
    how u did this... plzzz guide me
    Anil

  • Enum type is retrieving me a null reference

    Hi, i have a very strange bug in my code that is messing me up.
    I defined two enum types in separated files like this:
    public enum Section {
         SectionA, SectionN;
    public enum Subsection {
        SubA(1, SectionA), SubN(2, SectionN);
        private Section sec;
        private int num;
        Subsection (int num, Section sec) {
            this.num = num;
            this.sec = sec;    // Here is the problem
    }Well, the problem is that in the line with the comment I'm recieving a null reference and I think that is not possible. Is that a compiler bug?

    I'm no getting any error message, let me show you my code:
    The problematic enum type.
    public enum Subseccion {
        ALUMNOS_ALTA(1, AltaAlumnos.class, "Alta", Privilegio.ALTA_ALUMNOS, Seccion.ALUMNOS),
        ALUMNOS_BUSCAR(2, BuscarAlumno.class, "Buscar", Privilegio.BUSCAR_ALUMNOS, Seccion.ALUMNOS),
        ALUMNOS_EDITAR(3, EditarAlumno.class, "Editar", Privilegio.EDITAR_ALUMNOS, Seccion.ALUMNOS),
        PERSONAL_ALTA(1, AltaPersonal.class, "Alta", Privilegio.ALTA_PROFESORES, Seccion.PERSONAL),
        PERSONAL_BUSCAR(2, BuscarPersonal.class, "Buscar", Privilegio.PERSONAL_BUSCAR, Seccion.PERSONAL),
        PERSONAL_EDITAR(3, EditarPersonal.class, "Editar", Privilegio.PERSONAL_EDITAR, Seccion.PERSONAL),
        MATERIAS(1, Materias.class, "Materias", Privilegio.ASIGNATURAS, Seccion.CURSOS),
        CURSOS(2, Cursos.class, "Cursos", Privilegio.CURSOS, Seccion.CURSOS),
        GRUPOS(3, Grupos.class, "Grupos", Privilegio.GRUPOS, Seccion.CURSOS),
        ASIGNAR_GRUPOS(4, AlumnosSalones.class, "Asignar Grupos", Privilegio.ASIGNAR_GRUPOS, Seccion.CURSOS);
        private final Class<? extends JPanel> panel;
        private final String texto;
        private final Seccion pa;  // La secci�n a la que pertenece
        private final Privilegio priv;   
        private final int importancia;
        Subseccion(int importa, Class<? extends JPanel> panel, String texto, Privilegio priv, Seccion fad) {
            this.panel = panel;
            this.texto = texto;
            if (fad == null)
                System.err.println("A NULL REFERENCE");   // Always happen
            pa = fad;
            this.priv = priv;
            this.importancia = importa;
        public int getImportancia() {
            return importancia;
         * Regresa el Panel construido que corresponde a la secci�n.
         * @param d El Objeto de base de datos que se usar� para crear el Panel.
         * @param ven El Objeto de ventana que se usar� para crear el Panel.
        public JPanel getPanelInstance(BaseDeDatosE d, VentanaPrincipal ven)
            throws InstantiationException, NoSuchMethodException, IllegalAccessException,
                    java.lang.reflect.InvocationTargetException {
            // Construyo el panel si es que hay uno asociado
            Constructor<? extends JPanel> cons = panel.getConstructor(BaseDeDatosE.class, VentanaPrincipal.class);
            JPanel panel = cons.newInstance(d, ven);
            return panel;
         * Devuelve el privilegio asociado a esta secci�n.
        public Privilegio getPrivilegio() {
            return priv;
         * Pone el "bot�n" en RollOver.
         * @param btn El "bot�n"
        public void setEstadoRollOver(JPanel btn) {
         * Pone el "bot�n" en estado presionado.
         * @param btn El "bot�n"
        public void setEstadoPresionado(JPanel btn) {
         * Devuelve la secci�n a la que pertenece.
        public Seccion getSec() {
            return pa;
         * Pone el "bot�n" en estado normal.
         * @param btn El "bot�n"
        public void setEstadoNormal(JPanel btn) {
    The enum type that is getting null.
    public enum Seccion {
        ALUMNOS(null, "/alumno", "Alumnos",
                new Subseccion[] {Subseccion.ALUMNOS_BUSCAR, Subseccion.ALUMNOS_ALTA, Subseccion.ALUMNOS_EDITAR},
                null),
        PERSONAL(null, "/profesor", "Personal",
                 new Subseccion[] {Subseccion.PERSONAL_BUSCAR, Subseccion.PERSONAL_ALTA, Subseccion.PERSONAL_EDITAR},
                 null),
        CURSOS(null, "/cursos", "Cursos",
               new Subseccion[] {Subseccion.CURSOS, Subseccion.GRUPOS, Subseccion.MATERIAS, Subseccion.ASIGNAR_GRUPOS},
               null),
        CURSOS_CALIFICAR(CalificarCursos.class, "/default", "Calificar Cursos", null, Privilegio.CALIFICAR_CURSOS),
        ASISTENCIA(Asistencia.class, "/default", "Asistencia", null, Privilegio.ASISTENCIA);
        private final Class<? extends JPanel> panel;
        private final String prefijoImagen;
        private final Subseccion[] subs;  // Las subseciones de esta secci�n
        private final String etiqueta;  // El texto que va a llevar el icono
        private final Privilegio priv;
        Seccion (Class<? extends JPanel> panel, String prefijoImagen, String etiqueta, Subseccion[] subs, Privilegio priv) {
            this.panel = panel;
            this.prefijoImagen = prefijoImagen;
            this.subs = subs;
            this.etiqueta = etiqueta;
            this.priv = priv;
         * Regresa el Panel construido que corresponde a la secci�n.
         * @param d El Objeto de base de datos que se usar� para crear el Panel.
         * @param ven El Objeto de ventana que se usar� para crear el Panel.
         * @return <code>null</code> Si no tiene un panel asociado.
        public JPanel getPanelInstance(BaseDeDatosE d, VentanaPrincipal ven)
            throws InstantiationException, NoSuchMethodException, IllegalAccessException,
                    java.lang.reflect.InvocationTargetException {
            if (panel != null) {
                // Construyo el panel si es que hay uno asociado
                Constructor<? extends JPanel> cons = panel.getConstructor(BaseDeDatosE.class, VentanaPrincipal.class);
                JPanel panel = cons.newInstance(d, ven);
                return panel;
            return null;
         * Devuelve el privilegio asociado a esta secci�n.
         * @return <code>null</code> Si no existe un privilegio asociado.
        public Privilegio getPrivilegio() {
            return priv;
         * Pone el icono de estado RollOver.
         * @param etiq El JLabel asociado a esta secci�n
        public void setIconoRollOver(JLabel etiq) {
            etiq.setIcon( new ImageIcon( getClass().getResource(prefijoImagen + "BtnOver.jpg") ) );
         * Pone el icono de estado Presionado.
         * @param etiq El JLabel asociado a esta secci�n
        public void setIconoPresionado(JLabel etiq) {
            etiq.setIcon( new ImageIcon( getClass().getResource(prefijoImagen + "Btn.jpg") ) );
         * Pone el icono de estado Normal.
         * @param etiq El JLabel asociado a esta secci�n
        public void setIconoNormal(JLabel etiq) {
            etiq.setIcon( new ImageIcon( getClass().getResource(prefijoImagen + "BtnBco.jpg") ) );           
         * Obtiene un arreglo con las subsecciones disponibles, en primer lugar la que
         * se deber�a mostrar por defecto.
         * @return <code>null</code> Si no tiene subsecciones asociadas.
        public Subseccion[] getSubsecciones() {
            return subs;
         * Le pone el texto a la etiqueta que muestra el icono de la secci�n.
        public void setTextoIcono(JLabel etiq) {
            etiq.setText(etiqueta);
    }And if you do
    Subseccion.ALUMNOS_ALTA;The message "NULL REFERENCE" is printed.

  • Enum type as generic

    In the following, what should X be so that E is recognized as an enum type?
    class A<E extends X> {
        . . . E.values() . . .
    }It seems that X of Enum<E> should work, but no joy. I thought that enum types were subclasses of java.lang.Enum, but apparently not fully.

    Enum<E> does not have a method values(). The compiler generates this method for every enum, but it is not declared in Enum.
    It can't be declared in Enum because it is static, and in Enum it would also be abstract (it is not implemented there), but static and abstract are incompatible modifiers.
    Even though we know it will always work, the language has no way to specify that every Enum<E> has that method, and so you can't call it on a type variable.
    As a solution (if you really need this to work), put a Class<E> argument in the constructor, save the Class<E> reference, use reflection on the reference to get values().class A<E extends Enum<E>> {
        Class<E> type;
        A(Class<E> type) { this.type = type; }
        void yourMethod() {
            E[] values=type.getMethod("values").invoke(null);
    }You'll need to deal with a few exceptions but they shouldn't in practice get thrown.
    Bruce

  • Enum types not supported in jws

    I'm using wls 10.3 and one of my java class has a property that used a java enum type and when I tried to run jwsc, I'm getting this error message:
    [jwsc] [ERROR] - Enum Types are not supported on a JWS: com.starcomsoft.pp.vo.RecordStatus
    [jwsc] C:\starcomsoft\jax-rpc-103-test117\source\server\com\starcomsoft\pp\order\jws\OrderWSImpl.java 205
    :21
    How can I fix this problem. Thanks for you help

    Thanks for reporting this problem! I have filed bug 18499900.
    BTW, according to the C++11 standard, the code is actually not valid. Section 6.4.2, switch statement, says an implicit conversion to an integral type is required, which is not the case for for a scoped enum (one using the "class enum" syntax). This limitation was raised in the C++ Committee as an issue to be fixed, and the C++14 standard makes the code valid.
    As a workaround, or to make the code conform to C++11, you can add casts to int for the enum variable and the enumerators.
    Message was edited by: Steve_Clamage

  • Introspection in Class hierarchy

    Is it possible to have something like this in TOOL/Forte ? I am trying to introspect an Object vertically on its class hierarchy and horizontally on its data members.
    public static String toDesc(Object obj, Class cls)
    Class super_cls = cls.getSuperclass();
    if(super_cls != null)
    spr += toDesc(obj, cls.getSuperclass());
    Field[] fld = cls.getDeclaredFields();
    for(int i=0; i < fld.length; i++)
    try
    spr += "\n<" + fld.getName() + ">" + fld[i].get(obj) + "</" + fld[i].getName() + ">";
    catch(Exception e)
    e.printStackTrace();
    return spr;

    What version of UDS are you using? There are some capabilities for querying classes and set/get values. Check the UDS Programming Guidelines.
    The UDS help states the following that might be helpful for you:
    "...Before you can use the AttributeDesc Get and Set methods for primitive types, you must determine whether or not the type is primitive. The following code fragment accepts an object and determines if the attribute type is or is not primitive. The example also deals with subclasses of DataValue because those classes have some generic methods. The example does not actually retrieve any specific values, but the comments suggest what could be done.
    method Browser.InspectAttribute(
    obj : Object, attName : String)
    begin
    cls : ClassType = obj.GetClassType();
    att : AttributeDesc = cls.GetAttribute(attName);
    typ : ClassType = att.GetType();
    if (typ.IsPrimitive()) then
    // This type is primitive. It can be retrieved
    // (and set) by using one of the Get/Set methods.
    pd : PrimitiveDesc = PrimitiveDesc(typ);
    elseif (typ.IsArray()) then
    // This type is an array type. Determine the element
    // type (if it is set) to make it possible
    // to further inspect the array's elements.
    ad : ArrayDesc = ArrayDesc(typ);
    eType : ClassType = ad.GetElementType(); // Can be NIL
    elseif (typ.IsInterface()) then
    // This type is an interface type. The inspector might
    // further interrogate the real object implementing
    // the interface, like any other object, or
    // do something special when inspecting interfaces.
    else
    // This type is an object type. If the type
    // is a subclass of DataValue you might want to deal
    // with it separately. Otherwise, if it's a simple object
    dvType : ClassType = DataValue;
    if (dvType.IsSuperOf(typ)) then
    // The type is a subclass of DataValue.
    // Once the attribute value is retrieved,
    // its value can be gotten by using the
    // DataValue.TextValue attribute.
    else
    // This is a simple object that, if not
    // NIL, requires further reflection.
    end if;
    end if ;
    end method; ..."
    The key I guess is here"
    "...Getting and setting the value of an attribute that is not a primitive type requires that the application know more about the current object than is necessary if its type is primitive. For example, an attribute of type Boolean might be assumed to have a default value of FALSE. But an attribute of type Array of IntegerData might have as its default value a NIL value or an empty array, or an array with a single IntegerData element initialized to 0.
    To get or set the value of the current attribute when the data type is a class or interface, use the GetValue and SetValue methods. If the data type is a class, specify an object whose class is a subtype of the class. If the data type is an interface, specify an object whose class implements the interface. ..."
    Remember that UDS reflection has been modeled following the Java Reflection Framework but it is not a full implementation of it.
    Let me know if I can be of any further help

  • Material Class Hierarchy

    Hi guys, does anyone know the SAP table for transaction CL22N - Assign Class to Superior Class?
    Thanks in advance.

    Hello,
    This function enables you to set up your class hierarchy as a class network by assigning a class to several superior classes.
    Procedure:
    To maintain one or more superior classes for a class within a hierarchy, proceed as follows:
    1.Choose in the Classification menu Assignment , Assign class to superior classes.
    2.Enter the name and class type of the class you want to include in the hierarchy. Use the pushbutton  Last processed classes to choose on of the last ten classes you have worked. These can also be classes that were processed with different applications.
    If the class you enter is part of a class hierarchy, you can choose Environment  Class hierarchy to see the other classes in the hierarchy in tree form.
    Confirm your entries.
    3.Enter one or more superior classes.
    When you assign classes to a class, you can restrict the allowed values of the characteristics. This means that only values from the restricted allowed values are allowed when you classify objects in these classes.
    4.If you want to assign values to characteristics and at the same time set restrictions for the values you must first position the cursor on a class. Double-click on the class or select  Values.
    You see a list of the characteristics of all the classes to which an object is assigned. This list is based on the user settings you made in Extras  User settings, tab page Value assignment.
    5.Save your assignment.
    Hope the information is useful
    Regards

  • Search for Objects via Class Hierarchy

    Dear colleagues,
    For searching of an Object via a Class Hierarchy, Program SAPLCLSD screen 1000 release 4.7, a double click is required on the Class (left side of the screen) from which you want to see the Objects. If you do not click double, the view of the related Objects will not be recreated.
    Is it possible to avoid the double clicking?

    Hello Alpesh,
    Thank you for your response. The user asked whether the double click, needed for the show of the objects, related to a Class, can be done with a single click.
    They use transaction CL20N, input Class type, search for material with F4 search by Class input of a Class, then a tree of Classes will be shown. Select a Class, use button 'Include subordinate classes' and, if available, the related object(s) are shown.
    The issue is that when you select another Class, you have to double click on the selected Class to make the screen with Objects empty.
    Can we change the double click easy to a single click?
    Kind regards, Jan van der Veen.  06-22973646 Netherlands.

  • Passing enums to functions without knowing the specific enum type

    My application needs the function invocation feature by using reflection mechanism. The function parameters are restricted to string, int, float and enums. I am facing problems with enums.
    Is there a way to invoke the function by passing specific enum type as parameter to the function.
    For eg:
    public void doProcess(int i, COLOR.RED){
    I should be able to invoke the above function using reflections. How dynamic casting to COLOR can be done is the question here?

    The application takes XML file as an input. This file has processing instructions. The processing instruction provides data about the class name, function name and parameters specifications like
    Classname_FunctionName("String param", 123, COLOR.RED)
    The application should invoke the corresponding library function by passing these parameters after assessing the correct types.

  • ALE Material Class Hierarchy

    Hi,
    We have created Material Classes / chararacters and have ALEd to the respective systems.
    We have defined Hierachies using CL22N.
    But when we ALE Classes using BD92, the Hierachy data or the links between classes does not get sent.
    Therefore in the receiving system we do not find the inherited charatcers.
    Can any if of you convey me if there is any transaction to ALE the Class Hierarchy?
    Thanks,
    Midhun.

    Hello,
    This function enables you to set up your class hierarchy as a class network by assigning a class to several superior classes.
    Procedure:
    To maintain one or more superior classes for a class within a hierarchy, proceed as follows:
    1.Choose in the Classification menu Assignment , Assign class to superior classes.
    2.Enter the name and class type of the class you want to include in the hierarchy. Use the pushbutton  Last processed classes to choose on of the last ten classes you have worked. These can also be classes that were processed with different applications.
    If the class you enter is part of a class hierarchy, you can choose Environment  Class hierarchy to see the other classes in the hierarchy in tree form.
    Confirm your entries.
    3.Enter one or more superior classes.
    When you assign classes to a class, you can restrict the allowed values of the characteristics. This means that only values from the restricted allowed values are allowed when you classify objects in these classes.
    4.If you want to assign values to characteristics and at the same time set restrictions for the values you must first position the cursor on a class. Double-click on the class or select  Values.
    You see a list of the characteristics of all the classes to which an object is assigned. This list is based on the user settings you made in Extras  User settings, tab page Value assignment.
    5.Save your assignment.
    Hope the information is useful
    Regards

  • ALE Class Hierarchy

    Hi,
    We have created Material Classes / chararacters and have ALEd to the respective systems.
    We have defined Hierachies using CL22N.
    But when we ALE Classes using BD92, the Hierachy data or the links between classes does not get sent.
    Therefore in the receiving system we do not find the inherited charatcers.
    Can any if of you convey me if there is any transaction to ALE the Class Hierarchy?
    Thanks,
    Midhun.

    I do not work with Class Hierarchyies, but Check your Message Type in your ALE Model.  There are several Mesage Types that can be selected when seeting up your Class Message.

  • Cannot convert ÿØÿà of type class java.lang.String to class BFileDomain.

    Hi All,
    I am using Jdeveloper 11.1.2.3.0.
    I have a scenario of making an ADF page where I have a IMAGE field to show on the page. So,I have a table called "PRODUCT" with fields called photo with BFILE type. Now when I the data i have inserted using the DML command and i can see the path at the backend.
    However,when i am runnig my ADF page in the Filed called "PHOTO" I can only see a junk character stating 'yoyo'.
    When I click on it, it says ERROR "Cannot convert ÿØÿà of type class java.lang.String to class oracle.jbo.domain.BFileDomain".
    Your help will be appreciated ASAP.
    Regards,
    Shahnawaz

    Hi,
    did you show the id-value in the user interface as a input-component, and did the input-component include a converter?
    If yes, show the id as output-text and remove any existing converter-components.
    Best Regards

  • Cannot convert type class java.lang.String to class oracle.jbo.domain.Clob

    Cannot convert type class java.lang.String to class oracle.jbo.domain.ClobDomain.
    Using ADF Business Components I have a JSFF page fragment with an ADF form based on a table with has a column of type CLOB. The data is retrieved from the database and displayed correctly but when any field is changed and submitted the above error occurs. I have just used the drag and drop technique to create the ADF form with a submit button, am I missing a step?
    I am using the production release of Jdeveloper11G

    Reproduced and filed bug# 7487124
    The workaround is to add a custom converter class to your ViewController project like this
    package oow2008.view;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.convert.Converter;
    import javax.faces.convert.ConverterException;
    import oracle.jbo.domain.ClobDomain;
    import oracle.jbo.domain.DataCreationException;
    public class ClobConverter implements Converter {
         public Object getAsObject(FacesContext facesContext,
                                   UIComponent uIComponent,
                                   String string) {
           try {
             return string != null ? new ClobDomain(string) : null;
           } catch (DataCreationException dce) {
             dce.setAppendCodes(false);
             FacesMessage fm =
               new FacesMessage(FacesMessage.SEVERITY_ERROR,
                                "Invalid Clob Value",
                                dce.getMessage());
             throw new ConverterException(fm);
         public String getAsString(FacesContext facesContext,
                                   UIComponent uIComponent,
                                   Object object) {
           return object != null ?
                  object.toString() :
                  null;
    }then to register the converter in faces-config.xml like this
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
      <application>
        <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
      </application>
      <converter>
        <converter-id>clobConverter</converter-id>
        <converter-class>oow2008.view.ClobConverter</converter-class>
      </converter>
    </faces-config>then reference this converter in the field for the ClobDomain value like this
              <af:inputText value="#{bindings.Description.inputValue}"
                            label="#{bindings.Description.hints.label}"
                            required="#{bindings.Description.hints.mandatory}"
                            columns="40"
                            maximumLength="#{bindings.Description.hints.precision}"
                            shortDesc="#{bindings.Description.hints.tooltip}"
                            wrap="soft" rows="10">
                <f:validator binding="#{bindings.Description.validator}"/>
                <f:converter converterId="clobConverter"/>
              </af:inputText>

Maybe you are looking for

  • Applescript open action and quarantine items

    Hi, I have a simple applescript droplet, but not all dropped files are being passed to the open handler. It appears that the problem is with files that have the com.apple.quarantine attribute set. If I drop a single file with this attribute set, the

  • Differences between CTI OS Server and CTI Server ?

    Hello community, I've been working with CTI Desktop for a while but I'm not clear about the differences between CTI OS Server and CTI Server? If you go to http://docwiki.cisco.com/wiki/Unified_CCE_Software_Compatibility_Matrix_for_8.5(x) and read not

  • OBIEE presentation layer agregate values are not acurate

    hi, i have a simple BMM where for the given fact year wise i want to show summation of values and %. here is the query generated by the OBIEE WITH SAWITH0 AS (select sum(T5779.SLA_NOT_MET) as c1, sum(T5779.SLA_MET) as c2, count(T5779.APP_ID) as c3, T

  • Use of F.19 - GR/IR clearing

    Hi, I am doing closing process for March 2009. There is something GR/IR clearing (F.19). Let me know the use of the same. Also tell me how to use. It is because i keyed in the details like GR/IR account number, etc. But no output was given. It told,

  • The Project implementation

    Hi Everybody, I am working with Implementation project for the first time at client place so i have to handle all the things ... so let me know the procedure how to proceed .... first is Blue prints ..... if any body is having blue prints format pls