RE: R : RE: Domain Classes

I think Kal's point was that you shouldn't follow the advice in the
"Customizing Forte Express Applications"
manual on page 90, which suggests creating a DBSession service object
and putting a method on a domain
with a SQL call that uses that session. There are several alternatives
to this, including the one you've outlined.
From: Tomacelli Cristina[SMTP:[email protected]]
Sent: Thursday, April 03, 1997 1:56 AM
To: Inman, Kal
Cc: Forte
Subject: R : RE: Domain Classes
First, it requires you to define a dbsession other than the one defined
by your business model. As you talk of business model, I think you are using Express.
Really it's not necessary defining a new dbsession and executing your sql
across the network.
What you should do is:
- create a method in your domain that takes as a parameter the business
client, construct the query you require and pass it to the select method of
the business client.
It's the business client that makes the work for you, passing the query to
the business service manager, so no sql goes from the client to the server
through the network.
The select method of the business client finally returns an array of
business class objects and you can use the array content to populate your
droplist.
Hope this helps.
Regards,
Cristina Tomacelli - CSI Piemonte
Corso Unione Sovietica, 216 - 10134 TORINO - ITALY
E-mail address: [email protected]
Telephone Number: +39-11-4618387
Da: Inman, Kal
A: blunda; chiaberto; tamietti; tomacelli;
[email protected]
Cc: [email protected]
Oggetto: RE: Domain Classes
Data: mercoled? 2 aprile 1997 16.08
Word of caution on the use of domains.
The "Customizing Forte Express Applications" manual, uses as an example,
defining a domain as a droplist. They go on to tell you how to create a
method that executes SQL to populate the droplist. This sounds very
encapsulated, but it has some strings.
First, it requires you to define a dbsession other than the one defined
by your business model. This is because your domain project supplies
you busness services, thus not giving access to the business services
dbsession.
Second, when executing the GUI that has this domain as a widget, the sql
is executed from the client across the network. This will cause
performance problems.
Third, the sql is executed every time you page to a new record. You
must provide your own caching.
If you choose to use domains to populate lists, build a caching object
and have the method constructed in the domain populate from this object.
Your caching object can be constructed to go through your existing
business services to retrieve information, eliminating the need for
another dbsession.
Good luck
Kal
From: Don Nelson[SMTP:[email protected]]
Sent: Wednesday, April 02, 1997 4:04 AM
To: [email protected]
Cc: [email protected]
Subject: Re: Domain Classes
Jennifer,
Domain classes act exactly the same as sub-classes of the nullable versions
of DataValue. The only real difference is their ability to be associated
with a widget. Can't think of any cons, offhand.
Don
At 11:09 AM 3/27/97 -0400, [email protected] wrote:
Jennifer Medeiros
03-27-97 11:09 AM
I am researching the pros and cons of domain classes. Can anyone give
me
some information? (I know how to create them and how to use them.)
Thanks for your time --
===================================
Don Nelson
Senior Consultant
Forte Software, Inc.
Denver, CO
Corporate voice mail: 510-869-3400 x2209
Cell: 414-416-4557
===================================

Jason,
Domain Classes can also store FieldWidget information associated with them.
For example, Widget type, Max Characters, Input Mask, Size Policy, Help
Text, etc. This means that when a developer adds the domain to the window
workshop it will automatically have all the settings that were previously
defined on the domain, therefore giving a standard look and feel, as well
as, behaviour(fillstring and SetValue).
Regards,
Allister
Xpedior
www.xpedior.com
Ph: +61-8-9320-7604
Fax: +61-8-9486-8650
-----Original Message-----
From: Jason de Cean [mailto:[email protected]]
Sent: Thursday, 21 October 1999 9:30
To: 'Forte Users'
Subject: (forte-users) Domain Classes
Hi,
Can anyone tell me the advantage of using a domain class ?
We have subclassed DecimalData (FormattedDecimal) and overridden the
FillString and SetValue methods to implement other formatting. This is
then used as an attribute on our data classes and appears to work fine
when mapped to forms.
So, why would we use a Domain Class instead of just sub classing
DecimalData ?
Jace.
Jason de Cean
Genisys Team
Lumley Technology Ltd.
Lvl. 8, 55 Sussex St
Sydney, NSW 2000 Australia
Ph: 02 9248 1321
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: [email protected]

Similar Messages

  • What is a domain class?

    I've looked on google but I can not find the correct answer.
    I have an assignment that says: create a domain class and a DAO to perform the database uptdate.
    What in fact is a domain class?

    jschell wrote:
    Kayaman wrote:
    I haven't heard people talking about DAOs much lately (in relation to Java I mean), since with the latest developments in persistence, you have EJBs pretty much handle the role of data access objects.I don't understand that statement.
    I would associate "EJB" with early J2EE/JEE architecture and as far as questions on this site go there are very few about EJBs (either as a general term or a specific one.) That has been replaced by POJO/Hibernate/JPA as general conversational topics.
    And DAO as Data Access Object doesn't show up as much as any of those but does show up more than EJB.I guess what I meant was having session beans in general handle the data accessing. Of course that's not true for everything. A lot has changed in these 10 or so years I've been involved with Java.
    My perspective is also a bit skewed due to some of the projects I'm involved in. For example we have one project that has been around for several years and it started out with EJB2 tech. Now it uses both EJB2 and EJB3 thanks to a "creative" emulation layer.
    Probably Spring and Struts2 and their friends have taken away the questions that once were about the EJBs. Which is just as well in my opinion.

  • Domain Class and EJB Component

    Hi,
    I have defined a set of domain classes(with get/set methods) and a set of EJB Session Beans for the business logics.
    The question is, where do I locate the domain classes?
    Create a package for it (e.g. com.mysystem.domain)?
    Or distribute it into the Session Bean packages (e.g. for account related domain classes, place it into com.mysystem.ejb.account)?
    The problem for placing it into the domain package:
    1. I have too many domain class ( >200). It's hard to maintain and perform analysis. (Imagine >200 classes in a class diagram)
    2. All session beans need to import the "com.mysystem.domain" package in order to reference the domain classes. Therefore, all session beans will have the dependency to the domain package. Is it what component based development (CBD) does?
    The problem for distribute it into the Session Bean packages:
    1. Some domain classes are heavily depends on other domain classes (e.g Address class has association relationship with the Customer class and Staff class) If I have a session bean for Staff Management(StaffBean) and Customer Management(CustomerBean), where should I put the Address class?
    1. Some domain classes are abstract classes. e.g. Person abstract class have a generalization relationship with the Customer class and Staff class. Similiar to point 1, where should I put the Person class?
    It is appreciate if anyone can clear my mind of component design.

    I have the same confusion, but I think we should place them in a separate packages , a package for each related bundle of domain objects, the logic behind this is that domain object should not know that you are using EJBs or any other technology .
    an OO expert advice is appreciated

  • RE: (forte-users) Domain Classes

    Hi,
    This thread coinsides with a recent posting I made on formatting percents
    (attached at end).
    The complication here is that the data field is part of an array field and
    is:
    1) editable
    2) part of an array of BObjects that are mapped to the array field
    There is no separation therefore between a BO and a DO, at least in the
    current implementation. Furthermore, the user may or may not want percent to
    be the display format. What I think I need is one field that actually has
    two values, a display value and a 'true' value, and each would probably need
    its own numeric format as well (one for data entry and one for display).
    I've never used a domain class, but do you know if such a beast be possible?
    -----Original Message-----
    I want to provide the option for a user to display values in percents or
    not, and finding this surprisingly tricky.
    Although its easy to make a DecimalData with a value of .08 look like 8% by
    changing the scale and multiplying by its value by 100, I don't see how to
    do this in a way that the variable still knows its value is .08.

    Jason,
    Domain Classes can also store FieldWidget information associated with them.
    For example, Widget type, Max Characters, Input Mask, Size Policy, Help
    Text, etc. This means that when a developer adds the domain to the window
    workshop it will automatically have all the settings that were previously
    defined on the domain, therefore giving a standard look and feel, as well
    as, behaviour(fillstring and SetValue).
    Regards,
    Allister
    Xpedior
    www.xpedior.com
    Ph: +61-8-9320-7604
    Fax: +61-8-9486-8650
    -----Original Message-----
    From: Jason de Cean [mailto:[email protected]]
    Sent: Thursday, 21 October 1999 9:30
    To: 'Forte Users'
    Subject: (forte-users) Domain Classes
    Hi,
    Can anyone tell me the advantage of using a domain class ?
    We have subclassed DecimalData (FormattedDecimal) and overridden the
    FillString and SetValue methods to implement other formatting. This is
    then used as an attribute on our data classes and appears to work fine
    when mapped to forms.
    So, why would we use a Domain Class instead of just sub classing
    DecimalData ?
    Jace.
    Jason de Cean
    Genisys Team
    Lumley Technology Ltd.
    Lvl. 8, 55 Sussex St
    Sydney, NSW 2000 Australia
    Ph: 02 9248 1321
    For the archives, go to: http://lists.sageit.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: [email protected]

  • Problem Domain Classes

    Hi:
    I am using "Object-oriented Application Development Using Java" by E. Reed Doke, John W. Satzinger, and Susan R. Williams for my OO class. Currently, I am learning how to create a domain class and how to invoke that class. One of the examples provided by the book involves two .java files, Slip.java (the class definition) and TesterFour.java (to invoke the class definition). When I tried to run TesterFour.java, I got a bunch of error messages. Following are the codes:
    1. Slip.java
    // Chapter 6
    // illustrate a PD class with a static variable and method
    public class Slip
         // attributes
         private int slipId;
         private int width;
         private double slipLength;
         // static attribute variable
         private static int numberOfSlips = 0;
         // constructor with 3 parameters
         public Slip(int anId, int aWidth, double aSlipLength)
              // invoke setters to populate attributes
              setSlipId(anId);
              setWidth(aWidth);
              setSlipLength(aSlipLength);
              numberOfSlips++;
         // custom method to lease a Slip
         public double leaseSlip()
              double fee;
              switch(width)
                   case 10: fee = 800;
                   break;
                   case 12: fee = 900;
                   break;
                   case 14: fee = 1100;
                   break;
                   case 16: fee = 1500;
                   break;
                   default: fee = 0;
              return fee;
         // setters
         public void setSlipId(int anId)
              {slipId = anId;}
         public void setWidth(int aWidth)
              { width = aWidth;}
         public void setSlipLength(double aSlipLength)
              { slipLength = aSlipLength;}
         // getters
         public int getSlipId()
              { return slipId;}
         public int getWidth()
              { return width;}
         public double getSlipLength()
              { return slipLength;}
         // static method
         public static int getNumberOfSlips()
              { return numberOfSlips;}
         // tellAboutSelf
         public String tellAboutSelf()
              String info;
              info = "Slip: Id = "
                        + getSlipId() + ", Width = "
                        + getWidth() + ", Length = "
                        + getSlipLength();               
              return info;
    2. TesterFour.java
    // Chapter 6 - Example 4
    // create 3 instances of Slip and invoke static method getNumberOfSlips
    public class TesterFour
         public static void main(String args[])
              // create an array to hold three Slip references
              Slip slips[] = new Slip[3];
              // create 3 Slip instances & display numberOfSlips for each
              slips[0] = new Slip(1, 10, 20);
              System.out.println("Number of slips " + Slip.getNumberOfSlips());
              slips[1]= new Slip(2, 12, 25);
              System.out.println("Number of slips " + Slip.getNumberOfSlips());
              slips[2]= new Slip(3, 14, 30);
              System.out.println("Number of slips " + Slip.getNumberOfSlips());
              // retrieve & display numberOfSlips using reference variable
              System.out.println("Number of slips (ref var) " + slips[0].getNumberOfSlips());
    Here are the error messages that I got when I tried to run TesterFour.java:
    TesterFour.java [12:1] cannot resolve symbol
    symbol : method getNumberOfSlips ()
    location: class Slip
    System.out.println("Number of slips " + Slip.getNumberOfSlips());
    ___________________________________^
    TesterFour.java [14:1] cannot resolve symbol
    symbol : method getNumberOfSlips ()
    location: class Slip
    System.out.println("Number of slips " + Slip.getNumberOfSlips());
    ___________________________________^
    TesterFour.java [16:1] cannot resolve symbol
    symbol : method getNumberOfSlips ()
    location: class Slip
    System.out.println("Number of slips " + Slip.getNumberOfSlips());
    ___________________________________^
    TesterFour.java [19:1] cannot resolve symbol
    symbol : method getNumberOfSlips ()
    location: class Slip
    System.out.println("Number of slips (ref var) " + slips[0].getNumberOfSlips());
    ___________________________________________^
    4 errors
    Errors compiling main.
    Please help me!! How can I make this code working?? And please remember that the code is originally from the book's CD.
    Thanks a lot.

    Hi,
    I'm sure Forte can find the file Slip.class since otherwise you would get different errors. Search your hard drive perhaps to know where Forte has stored these files.
    If you would have created Slip.java partially, compiled it, and then unzipped the files from the CD, it might not recompile since the last file is older then the class file. Therefor you'll need to delete this one manually (or is there a 'clean' command in Forte perhaps?)

  • Can not filter the data with the extended class

    Hi,
    I have a quick question about PortableObject format. I have created a class which extends PortableObject interface and implemented serializer methods as well. I have updated it in the pof-config.xml file as well. If I insert the objects of this type of object in the cache, they get inserted properly and I can filter the values based on the getters defined in the class. Everything works fine here.
    Now, I am trying to extend the existing class that I have. We have our custom API which we have built for our domain objects. I need to store these objects in the cache. So, naturally I need to implement PortableObject interface to do that. So, instead of creating a new class with new set of getters and setters and local fields, I am extending our domain class to create a new class which implements PortableObject interface. Instead of defining the local fields and getters and setters i am reusing the ones provided by my existing class. Now, I can insert the objects of the new class to the cache. But I can not filter the values for the objects of this new class.
    Let me show you what exactly I am trying to achieve by giving a small example:
    Domain Class:
    class Person
    private String person_name;
    *public String getPerson_name() {return person_name;}*
    *public String setPerson_name(person_name) {this.person_name = person_name;}*
    The new class implementing PortableObject interface:
    class ExtPerson extends Person implements PortableObject
    public static final PERSON_NAME = 0;
    *public void readExternal(PofReader reader) throws IOException{*
    setPerson_name(reader.readString(PERSON_NAME));
    *public void writeExternal(PofWriter writer) throws IOException{*
    writer.writeString(PERSON_NAME, getPerson_name());
    *// And HashCode, Equals and ToString methods, all implemented using the getter from the Person class*
    So, if I create a new class ExtPerson without extending the Person class and write all the methods, store the objects in the cache and perform the following query, I get the size printed
    System.out.println((cache.entrySet(new EqualsFilter("getPerson_name","ABC"))).size());
    But if I use the extended class and insert the values into the cache and if I use the same query to filter, I get 0 printed on the console.
    System.out.println((cache.entrySet(new EqualsFilter("getPerson_name","ABC"))).size());
    So, can anyone tell what exactly is causing this?
    Thanks!

    Well, just a quick question. It seems that I can not get ContainsAnyFilter or ContainsAllFilter working.
    EqualsFilter is actually working properly.
    I am preparing a Set of Strings and passing it to ContainsAnyFilter or ContainsAllFilter and it is returning me 0 records.
    E.g.:
    Set<String> setStr = new HashSet<String>();
    setStr.add("ABC");
    setStr.add("DEF");
    System.out.println((cache2.entrySet(new ContainsAnyFilter("getPerson_name", setStr))).size());
    I get 0 in my output
    If I try this:
    System.out.println((cache.entrySet(new EqualsFilter("getPerson_name","ABC"))).size());
    System.out.println((cache.entrySet(new EqualsFilter("getPerson_name","DEF"))).size());
    I get 1 for each of the query.
    If I club all these EqualsFilter in a Filter[] array and create an AnyFilter or AllFilter and pass it to the query, it works fine.
    List<Object> lst = new ArrayList<Object>();
              lst.add("ABC");
              lst.add("DEF");
    Filter[] filter = new Filter[lst.size()];
         for(int i=0;i<lst.size();i++)
              filter[i] = new EqualsFilter("getPerson_name",lst.get(i).toString());
    AnyFilter fil = new AnyFilter(filter);
    System.out.println((cache4.entrySet(fil)).size());
    I get the desired result here, which is 2.
    Am I missing something here?

  • PL/SQL Object Type - Java oracle.jbo.domain

    PL/SQL Object Type <-> Java oracle.jbo.domain
    can anybody help me, getting my domains to work?
    Following scenario:
    in pl/sql we have an object type called MULTI_LANGUAGE. This type is used for storing multilingual texts as nested table in one(!) column.
    So the object MULTI_LANGUAGE contains a member variable LANGUAGE_COLLECTION of type LANGUAGE_TABLE, which itself is a nested table of objects
    of the type LANGUAGE_FIELD (this again is only a language id and the corresponding content)
    Also the methods setContent(langID, langContent) and getContent(langId) are defined on Object MULTI_LANGUAGE.
    For example: Table having primary key, 2 other columns and one column of object type MULTI_LANGAGE (=nested table of objects)
    |ID|Column1|Column2|  multilingual Column  |
    |--|---------------------------------------|
    |  |       |       |  -------------------  |
    |  |       |       | | 1 | hello         | |
    |  |       |       |  -------------------  |
    |1 | foo   | bar   | | 2 | hallo         | |   <- Row Nr 1
    |  |       |       |  -------------------  |
    |  |       |       | | 3 | ola           | |
    |  |       |       |  -------------------  |
    |--|-------|-------|-----------------------|
    |  |       |       |  -------------------  |
    |  |       |       | | 1 | world         | |
    |  |       |       |  -------------------  |
    |2 | abc   | def   | | 2 | welt          | |   <- Row Nr 2
    |  |       |       |  -------------------  |
    |  |       |       | | 3 | ???  ;-)      | |
    |  |       |       |  -------------------  |
    |--|-------|-------|-----------------------|Now i've tried to modell this structure as an oracle.jbo.domain.
    class MultiLanguage extends Struct having this StructureDef:
    attrs[(0)] = new DomainAttributeDef("LanguageColl", "LANGUAGE_COLL", 0, oracle.jbo.domain.Array.class, 2003, "ARRAY", -127, 0, false, "campusonlinepkg.common.LanguageField");
    and
    class LanguageField extends Struct having this StructureDef:
    attrs[(0)] = new DomainAttributeDef("Id", "ID", 0, oracle.jbo.domain.Number.class, 2, "NUMERIC", -127, 0, false);
    attrs[(1)] = new DomainAttributeDef("Content", "CONTENT", 1, java.lang.String.class, 12, "VARCHAR", -127, 4000, false);
    Is there anything wrong with this StructureDef?
    When running the BC-Browser with -Djbo.debugoutput=console -Djbo.jdbc.driver.verbose=true parameters I get suspect warnings when browsing the records
    [196] Executing FAULT-IN...SELECT NR, NAME FROM B_THESAURI BThesauri WHERE NR=:1
    [197] SQLException: SQLState(null) vendor code(17074)
    [198] java.sql.SQLException: Ungültiges Namensmuster: XMLTEST.null
    ...snip: detail of stack...
    [240] SQLException: SQLState(null) vendor code(17060)
    [241] java.sql.SQLException: Deskriptor konnte nicht erstellt werden: Unable to resolve type "null"
    ...snip: detail of stack...
    [280] Warning:No element type set on this array. Assuming java.lang.Object.
    (XMLTEST is the name of the schema)
    Seems as if the framework can't read the TypeDescriptor or does not know which descriptor to read (XMLTEST.null??)
    Do I have to implement my own JboTypeMap?
    Please help, I'm stuck.
    Thanks in advance, Christian

    Thanks for your suggestion, but it seems to me as if there is one level missing.
    in pl/sql I have following structure:
    Struct MULTI_LANGUAGE (Object type) - outermost
      Array LANGUAGE_TABLE (nested table type)
        Struct LANGUAGE_FIELD (Object type simple) - innermostthe reason why i had to wrap another struct around the array was because it is not possible to define methods on a nested table. this is only possible on objects.
    on the outermost object type (which holds the array of language fields) I needed to define following 2 methods for direct access:
    getContent (langId in number) returns varchar2
    setContent (langId in number, langContent in varchar2)
    I would like to rebuild the same structure in java, because newly written java code should live in perfect harmony with legacy pl/sql code ;-)
    Both applications (Java and pl/sql) have to access the same data as long as migration to java goes on.
    Is this nested structure too much for a Domain?
    Any other suggestions?
    Thanks again, Christian

  • Need FM/Class for Direct deletion of Development Class/Package in ABAP

    Hi experts,
    I had stored all the unwanted objects in a development class/ package which I intended to delete later. I want this deletion to be done automatically. Is there a function module or class that can help me do this?
    Thanks in advance,
    Adithya
    Edited by: Adithya K Ramesh on Jul 18, 2011 3:56 PM

    I was hoping a separate server-side process wouldn't be needed -- if you're thinking of something like RMI, that's also a bit heavyweight for my needs. I know I can talk to the remote server on telnet port 23, though.
    Further experimentation today with the Jakarta net library has generated something that works using their telnet classes. (After I asked for help here, of course. The same thing happens when I shop for groceries....) But using this leaves me referencing an external library that:
    1. has functionality I don't need that complicates the code, and
    2. forces me to address licensing requirements.
    So I'd still love to see an example of a telnet-like Java class that strips away all the non-essentials in the Jakarta telnet library code, leaving behind a simple public domain class that can be used to connect to a remote host and transfer characters over that connection.
    I appreciate that this may be asking for a lot, but as they say, if you don't ask, you don't get. ;-)
    Thanks!

  • Re: How do you create and use "common" type classes?

    Hi,
    You have 2 potential solutions in your case :
    1- Sub-class TextNullable class of Framework and add your methods in the
    sub-class.
    This is the way Domain class work. Only Nullable classes are sub-classable.
    This is usefull for Data Dictionary.
    The code will be located in any partition that uses or references the supplier
    plan.
    2- Put your add on code on a specific class and instanciate it in your user
    classes (client or server).
    You could also use interface for a better conception if needed. The code will
    also be in any partition that uses or references the supplier plan where your
    add on class is located.
    If you don't want that code to be on each partition, you could use libraries :
    configure as library the utility plan where is your add-on class.
    You can find an example of the second case (using a QuickSort class,
    GenericArray add-on) with the "QuickSort & List" sample on my personal site
    http://perso.club-internet.fr/dnguyen/
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    http://perso.club-internet.fr/dnguyen/
    Robinson, Richard a &eacute;crit:
    I'm relatively new to forte and I'd like to know how can you handle utility
    type classes that you want to use through out your application? Ideally
    what I want is a static class with static methods.
    Let's say that I have a StringUtil class that has a bunch of methods for
    manipulating strings.
    My problem is that we have code that runs on the client and code that runs
    on the server. Both areas could use the StringUtil class, but from what I
    understand, I have to create StringUtil in a plan and then create a server
    object of type StringUtil. The server object will eventually get assigned
    to a partition. That's not good since I really want the server object to
    physically reside at the server end and at the client end. (Actually, I
    don't want a server object, I just want to invoke a static method of a
    static class).
    Any clues on how to solve this problem would be appreciated.
    Also, what is the url at Sage-it that has a summary of all emails that have
    been posted to [email protected]? Perhaps this question has been
    answered previously.
    Thanks in advance
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi Richard,
    Your question about "utility classes" brings up a number of issues, all of
    which are important to long-term success with Forte.
    There is no such thing as a static method (method that is associated with a
    class but without an implicit object reference - this/self/me "pointer") in
    TOOL, nor is there such thing as a global method (method not associated
    with a class at all). This is in contrast to C++, which has both, and
    Java, which has static methods, but not global classes. Frequently, Forte
    developers will write code like this:
    result, num : double;
    // get initial value for num....
    tmpDoubleData : DoubleData = new;
    tmpDoubleData.DoubleValue = num;
    result = tmpDoubleData.Sqrt().DoubleValue;
    tmpDoubleData = NIL; // send a hint to the garbage collector
    in places where a C++ programmer would write:
    double result, num;
    // get initial value for num....
    result = Math::Sqrt(num);
    or a Java programmer would write:
    double result, num;
    // get initial value for num....
    result = Math.sqrt(num);
    The result of this is that you end up allocating an extra object now and
    then. In practice, this is not a big deal memory-wise. If you have a
    server that is getting a lot of hits, or if you are doing some intense
    processing, then you could pre-allocate and reuse the data object. Note
    that optimization has its own issues, so you should start by allocating
    only when you need the object.
    If you are looking for a StringUtil class, then you will want to use an
    instance of TextData or TextNullable. If you are looking to add methods,
    you could subclass from TextNullable, and add methods. Note that you will
    still have to instantiate an object and call methods on that object.
    The next issue you raise is where the object resides. As long as you do
    not have an anchored object, you will always have a copy of an object on a
    partition. If you do not pass the object in a call to another partition,
    the object never leaves. If you pass the object to another partition, then
    the other partition will have its own copy of the object. This means that
    the client and the server will have their own copies, which is the effect
    you are looking for.
    Some developers new to Forte will try to get around the lack of global
    methods in TOOL by creating a user-visible service object and then calling
    methods on it. If you have a general utility, like string handling, this
    is a bad idea, since a service object can reside only on a single
    partition.
    Summary:
    * You may find everything you want in TextData.
    * Unless you anchor the object, the instance will reside where you
    intuitively expect it.
    * To patch over the lack of static methods in TOOL, simply allocate an
    instance when required.
    Feel free to email me if you have more questions on this.
    At the bottom of each message that goes through the mailing list server,
    the address for the list archive is printed:
    http://pinehurst.sageit.com/listarchive/.
    Good Luck,
    CSB
    -----Original Message-----
    From: Robinson, Richard
    Sent: Tuesday, March 02, 1999 5:44 PM
    To: '[email protected]'
    Subject: How do you create and use "common" type classes?
    I'm relatively new to forte and I'd like to know how can you handle utility
    type classes that you want to use through out your application? Ideally
    what I want is a static class with static methods.
    Let's say that I have a StringUtil class that has a bunch of methods for
    manipulating strings.
    My problem is that we have code that runs on the client and code that runs
    on the server. Both areas could use the StringUtil class, but from what I
    understand, I have to create StringUtil in a plan and then create a server
    object of type StringUtil. The server object will eventually get assigned
    to a partition. That's not good since I really want the server object to
    physically reside at the server end and at the client end. (Actually, I
    don't want a server object, I just want to invoke a static method of a
    static class).
    Any clues on how to solve this problem would be appreciated.
    Also, what is the url at Sage-it that has a summary of all emails that have
    been posted to [email protected]? Perhaps this question has been
    answered previously.
    Thanks in advance

  • Cisco Wireless Broadcast Domain Sizing for ISE depoloyments

    Good Day Community,
    While deploying Cisco ISE solutions we have come across some conflicting deployment models. We have a corporate wireless network segmented in to 3 broadcast domains(class C). Which might be on the small side how ever the CCDA and CCDP tracks suggest only using up to a /23 network segment. While this is starts to present a challenge with regards to the ISE Authz policies as the ISE AuthZ Profile can only place it into one vlan id. This can be worked around by disabling aaa override. How ever this is against the design guide of TrustSec and you lose a lot of functionality of the ISE to authorize devices for a BYOD  a single SSID.
    Surely this must have been faced by other people out there deploying Wireless ISE solutions with +1000 concurrent devices.
    Any and all suggestions are welcome.

    You should be able to use "interface group" instead of a vlan when aaa-overriding using ISE.
    In this way you can map multiple vlans to the same interface group. So when overriding, users could get any vlan/subnet IP belong to that interface group.
    interface group concept illustrate in this post
    http://mrncciew.com/2013/01/27/understanding-vlan-select-feature/
    HTH
    Rasika
    **** Pls rate all useful responses ****

  • Need simple class for communicating with Solaris account

    Hey, gang. After over a week of searching this forum and the Web for a solution, I'm stuck. I hope someone here can help.
    I've got a Java application intended to run on both Windows and Solaris systems that needs to perform the following automated operations:
    1. Connect to a user account on a Solaris server.
    2. Login.
    3. Run an sccs command.
    4. Retrieve the output from the sccs command.
    I can run commands (such as sccs) directly from Java; I've worked out how to do that. My situation is that I need to run sccs from an authorized account so that all file checkin/checkout operations are tagged properly. So the requirement to connect to a server isn't one I can ignore. I also don't need a full-up interactive client interface -- this needs to be an automated process.
    What I'm hoping is that someone here will be willing to provide (or point me to) some relatively simple source code I can call to do this stuff. Maybe an example of a class that uses Socket and a couple of streams to programmatically connect to a server, send commands, and capture input. That's really all I need.
    I've tried calling the Jakarta Commons telnet class to connect to the Solaris server, but it's more overhead than I need. (Plus the input stream kept blocking when I tried to use it in a purely automated mode.) I've also tried rolling my own code using the minimal info available on Google, but have not been able to figure out the magic words necessary to get anything back but gibberish. (InputStream and BufferedReader just do not seem to want to cooperate. Either I get back only garbage text, or readLine() or read() gets nothing and just sits and waits until the timeout.)
    So I turn to the experts here. If anyone can offer (or direct me to) any simple, non-libraried source code that enables my Java code to connect to and talk to a Solaris machine, I'd be grateful.
    Thanks!

    I was hoping a separate server-side process wouldn't be needed -- if you're thinking of something like RMI, that's also a bit heavyweight for my needs. I know I can talk to the remote server on telnet port 23, though.
    Further experimentation today with the Jakarta net library has generated something that works using their telnet classes. (After I asked for help here, of course. The same thing happens when I shop for groceries....) But using this leaves me referencing an external library that:
    1. has functionality I don't need that complicates the code, and
    2. forces me to address licensing requirements.
    So I'd still love to see an example of a telnet-like Java class that strips away all the non-essentials in the Jakarta telnet library code, leaving behind a simple public domain class that can be used to connect to a remote host and transfer characters over that connection.
    I appreciate that this may be asking for a lot, but as they say, if you don't ask, you don't get. ;-)
    Thanks!

  • Date class is missing in docs

    Hi, could anybody give me documentation to the Oracle.jbo.Domain.Date class ?
    Why this is not documented?
    why give this class with the same name than java.util.Date ? it really turns coding hard:
    oracle.jbo.Domain.Date d1 = getMyDate();
    java.util.Date d2 = d1.toDate();
    it's really disgusting.
    null

    There is a bug logged regarding the missing javadoc in JDev 3.1. There was documentation for the Date in JDev 3.0. Apparently we missed it somehow. Below is the javadoc from JDev 3.0. Sorry for the long post, but I hope it helps.
    oracle.jbo.domain
    Class Date
    java.lang.Object
    |
    +--oracle.sql.Datum
    |
    +--oracle.sql.DATE
    |
    +--oracle.jbo.domain.Date
    public class Date
    extends oracle.sql.DATE
    implements DomainInterface, oracle.sql.CustomDatum, java.io.Serializable
    An encapsulation of Oracle SQL DATE objects as immutable Domain objects.
    Date objects consist of data (a byte array) and a Domain type code. Domain dates extend SQL dates by being convertable to and from JDBC values.
    Since:
    JDevloper 3.0
    See Also:
    Serialized Form
    Fields inherited from class oracle.sql.DATE
    BDA, BDAL, BDT, BHR, BHRL, BMN, BMNL, BMO, BMOL, BSC, BSCL, BYR, BYRL, HRZER0, MIZERO, MSD, SEZERO, YR0
    Constructor Summary
    Date()
    Creates a default Date Domain object.
    Date(byte[] value)
    Internal: Applications should not invoke this method.
    Date(Date value)
    Creates a Date identical to an existing Date.
    Date(java.sql.Date value)
    Creates a Date Domain object from a JDBC Date.
    Date(oracle.sql.DATE value)
    Creates a Date Domain object from an Oracle SQL DATE.
    Date(java.lang.Object value)
    Creates a Date Domain object from a JDBC Object.
    Date(java.lang.String value)
    Creates a Date Domain object from a Java String.
    Date(java.sql.Time value)
    Creates a Date Domain object from a JDBC Time object.
    Date(java.sql.Timestamp value)
    Creates a Date Domain object from a JDBC Timestamp object.
    Method Summary
    oracle.sql.DATE addJulianDays(int julianDay, int julianSec)
    oracle.sql.DATE addMonths(int months)
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    Number diffInMonths(Date date)
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    oracle.sql.NUMBER diffInMonths(oracle.sql.DATE date)
    boolean equals(java.lang.Object other)
    Tests this for equality with another object.
    static oracle.sql.DATE fromJulianDays(int julianDay, int julianSec)
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    static oracle.sql.DATE fromText(java.lang.String datestr, java.lang.String fmt, java.lang.String lang)
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    static oracle.sql.DATE getCurrentDate()
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    static oracle.sql.CustomDatumFactory getCustomDatumFactory()
    Internal: Applications should not invoke this method.
    java.lang.Object getData()
    Converts this to a JDBC Timestamp object.
    int hashCode()
    Computes a hash code for this.
    oracle.sql.DATE lastDayOfMonth()
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    static void main(java.lang.String[] argv)
    Internal: Applications should not invoke this method.
    oracle.sql.DATE round(java.lang.String prec)
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    oracle.sql.DATE setDayOfWeek(int day)
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    oracle.sql.Datum toDatum(oracle.jdbc.driver.OracleConnection conn)
    Internal: Applications should not invoke this method.
    oracle.sql.NUMBER toNumber()
    java.lang.String toString()
    Converts this to a textual representation.
    oracle.sql.DATE truncate(java.lang.String prec)
    Methods inherited from class oracle.sql.DATE
    checkValidity, compareTo, dateValue, diffInJulianDays, isConvertibleTo, makeJdbcArray, numberToJulianDays, stringValue, timestampValue, timeValue, toBytes, toBytes, toBytes, toBytes, toBytes, toDate, toJdbc, toJulianDays, toString, toText, toTime, toTimestamp
    Methods inherited from class oracle.sql.Datum
    asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, byteValue, characterStreamValue, doubleValue, floatValue, getBytes, getLength, getStream, intValue, longValue, setBytes, setShareBytes, shareBytes
    Methods inherited from class java.lang.Object
    getClass, notify, notifyAll, wait, wait, wait
    Constructor Detail
    Date
    public Date()
    Creates a default Date Domain object.
    This constructor does not create a null date: use one of the NullValue() constructors.
    Date
    public Date(byte[] value)
    Internal: Applications should not invoke this method.
    Creates a Date Domain object from the given byte array.
    Parameters:
    value - a value returned by a previous call to getBytes() on an SQL object compatable with Date.
    Date
    public Date(oracle.sql.DATE value)
    Creates a Date Domain object from an Oracle SQL DATE.
    Parameters:
    value - a DATE SQL object.
    Date
    public Date(Date value)
    Creates a Date identical to an existing Date.
    Parameters:
    value - a Date Domain object.
    Date
    public Date(java.sql.Date value)
    Creates a Date Domain object from a JDBC Date.
    Parameters:
    value - a DATE SQL object.
    Date
    public Date(java.sql.Time value)
    Creates a Date Domain object from a JDBC Time object.
    Parameters:
    value - a Time SQL object.
    Date
    public Date(java.sql.Timestamp value)
    Creates a Date Domain object from a JDBC Timestamp object.
    Parameters:
    value - a Time SQL object.
    Date
    public Date(java.lang.Object value)
    throws java.sql.SQLException
    Creates a Date Domain object from a JDBC Object.
    Parameters:
    value - an Object that is an instance of Date, Time, Timestamp, or String.
    Throws:
    java.sql.SQLException - if the object is not of one of the recognized classes.
    Date
    public Date(java.lang.String value)
    Creates a Date Domain object from a Java String.
    Parameters:
    value - a textual representation of a Date.
    Method Detail
    getCustomDatumFactory
    public static oracle.sql.CustomDatumFactory getCustomDatumFactory()
    Internal: Applications should not invoke this method.
    Initializes the Date Domain.
    This method is invoked when JBO is initialized. Applications should not call this method directly.
    Returns:
    the CustomDatumFactory for the Date Domain.
    toDatum
    public oracle.sql.Datum toDatum(oracle.jdbc.driver.OracleConnection conn)
    throws java.sql.SQLException
    Internal: Applications should not invoke this method.
    Converts this Date Domain object back into an SQL DATE object.
    Specified by:
    toDatum in interface oracle.sql.CustomDatum
    Parameters:
    conn - Not used.
    Returns:
    A Datum containing DATE object.
    Throws:
    SQLException - Never.
    getData
    public java.lang.Object getData()
    Converts this to a JDBC Timestamp object.
    Specified by:
    getData in interface DomainInterface
    Tags copied from interface: DomainInterface
    Returns:
    a formatted value object.
    toString
    public java.lang.String toString()
    Converts this to a textual representation.
    Overrides:
    toString in class java.lang.Object
    equals
    public boolean equals(java.lang.Object other)
    Tests this for equality with another object. The argument is converted to a Date object, if necessary.
    Overrides:
    equals in class oracle.sql.Datum
    Parameters:
    other - an arbitrary Object.
    Returns:
    true if conversion was successful and the converted argument is identical to this.
    hashCode
    public int hashCode()
    Computes a hash code for this.
    Overrides:
    hashCode in class java.lang.Object
    Returns:
    the hash code of this.
    addJulianDays
    public oracle.sql.DATE addJulianDays(int julianDay,
    int julianSec)
    Overrides:
    addJulianDays in class oracle.sql.DATE
    Returns:
    a Date Domain object.
    addMonths
    public oracle.sql.DATE addMonths(int months)
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    Overrides:
    addMonths in class oracle.sql.DATE
    See Also:
    "oracle.sql.DATE"
    diffInMonths
    public Number diffInMonths(Date date)
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    See Also:
    "oracle.sql.DATE"
    diffInMonths
    public oracle.sql.NUMBER diffInMonths(oracle.sql.DATE date)
    Overrides:
    diffInMonths in class oracle.sql.DATE
    getCurrentDate
    public static oracle.sql.DATE getCurrentDate()
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    See Also:
    "oracle.sql.DATE"
    fromJulianDays
    public static oracle.sql.DATE fromJulianDays(int julianDay,
    int julianSec)
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    See Also:
    "oracle.sql.DATE"
    fromText
    public static oracle.sql.DATE fromText(java.lang.String datestr,
    java.lang.String fmt,
    java.lang.String lang)
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    See Also:
    "oracle.sql.DATE"
    lastDayOfMonth
    public oracle.sql.DATE lastDayOfMonth()
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    Overrides:
    lastDayOfMonth in class oracle.sql.DATE
    See Also:
    "oracle.sql.DATE"
    round
    public oracle.sql.DATE round(java.lang.String prec)
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    Overrides:
    round in class oracle.sql.DATE
    See Also:
    "oracle.sql.DATE"
    setDayOfWeek
    public oracle.sql.DATE setDayOfWeek(int day)
    Overrides the Oracle SQL method of the same name to return a Date Domain object.
    Overrides:
    setDayOfWeek in class oracle.sql.DATE
    See Also:
    "oracle.sql.DATE"
    toNumber
    public oracle.sql.NUMBER toNumber()
    Overrides:
    toNumber in class oracle.sql.DATE
    Returns:
    a Date Domain object.
    truncate
    public oracle.sql.DATE truncate(java.lang.String prec)
    Overrides:
    truncate in class oracle.sql.DATE
    Returns:
    a Date Domain object.
    main
    public static void main(java.lang.String[] argv)
    throws java.sql.SQLException
    Internal: Applications should not invoke this method.-- Brian

  • ACE class-map match url syntax

    Can someone help me with the string that would match a url with no path specified?  For instance; user types "https://outlook.domain.net" into their browser and I want the ACE to redirect that request to https://outlook.domain.net/owa".
      2 match http url oulook\.domain\.net\

    Adam and Shday,
    I'll give you a hand on this =)
    Adam we can solve your problem only if you're doing SSL offloading on the ACE as the layer 5 information that needs to be checked is being sent encrypted.
    In case SSL termination is configured then the configuration would be like this:
    rserver redirect OWA
      webhost-redirection https://%h/owa 301
      inservice
    serverfarm redirect OWA
      rserver OWA
        inservice
    class-map type http loadbalance match-any OWA
    2 match http header Host header-value "outlook.domain.net"
    policy-map type loadbalance first-match OWA
    class OWA
      serverfarm OWA
    class class-default
      serverfarm Backend
    Shday yours is pretty much the same but you need to decide if class-default needs
    to be in place:
    rserver redirect Domain
    webhost-redirection http://%h/any_path 301
    inservice
    serverfarm redirect Domain
       rserver Domain
         inservice
    class-map type http loadbalance match-any Any
    2 match http url /.*
    class-map type http loadbalance match-any Domain
    2 match http header Host header-value "domain.com"
    policy-map type loadbalance first-match Domain
    class Any
      serverfarm Backend
    class Domain
      serverfarm Domain
    HTH
    Pablo

  • Domains for Oracle object types

    When I create a domain for a certain Oracle object type there is no way to create some kind of inheritance tree (and there is no discriminator support it seems). On the database level I have several object types that extend a certain base object type. I want to do the same at the BC4J level. But unfortunately this doesn't seem possible. Is there a work-around for it? I don't mind to write a little extra code, any hints or help are appreciated.
    Regards,
    Peter
    P.S.
    It seems the object type / domain support in JDeveloper 9.0.3(.1) isn't quite up there with entities and view objects. It's not even possible to change an attribute name at the Java side using the domain dialog (it's only possible by manually editing the XML and Java files). Will JDeveloper 9.0.4 have broader support for object types / domains?

    I've found a way to implement the inheritance myself, at least a start. I've noticed all custom domains for oracle object types have the static method "getCustomerDatumFactory". In this method (in the base domain class) normally an instance of the base type is returned. I've modified this method so that it returns instances of the different subtypes depending on the value of a certain column. To make this work I first have to edit the Java files of the subtypes and let them extend the base type instead of the Struct class. The factory method looks like this:
    public static CustomDatumFactory getCustomDatumFactory()
        if (fac == null)
          class facClass implements CustomDatumFactory
            public CustomDatum create(Datum d, int sql_type_code) throws SQLException
              if (d != null)
                BaseType b = new BaseType(d);
                if ("subtype1".equals(b.getType())) b = new SubType1(d);
                else if ("subtype2".equals(p.getType())) b = new SubType2(d);
                else System.err.println("Unknown subtype: " + b.getType());
                return b;
              return null;
          fac = new facClass();
        return fac;
      }I also tried to save several of the subtypes in the database in the attribute field (which is of the base type) using setAttribute, this seems to work out-of-the-box. It seems for now I only get this to work if the object type is saved in a column of a certain table, I can't get it to work (yet) for object type tables (see the other recent topic of mine).
    Is this the correct way to implement what I want? Or is there a better way?
    Regards,
    Peter

  • Conversion of association in ClassDiagram to class definition?

    I have a doubt regarding association in class diagram and actual definition of clasees. Say we have two classes customer and order. Customer can give N orders while one order belongs to one customer. So when we draw the class diagram we can represent this relationship with bidirectional arrow between customer and order with N written on order side and 1 written on customer side .correct?
    Now when we convert this class diagram to actual definition of class, can we simply say customer object will have array of order objects and order object will have a customer object associated with it?
    Now lets change the scenario little bit,order object does not know anything about customer objects. In that case order object will not contain customer, rest will be same as above.
    Is this correct?

    Say we have two classes customer and order. Customer can give N orders while one order belongs to one customer. So when we draw the class diagram we can represent this relationship with bidirectional arrow between customer and order with N written on order side and 1 written on customer side .correct?Yes.
    Now when we convert this class diagram to actual definition of class, can we simply say customer object will have array of order objects and order object will have a customer object associated with it?Well, I'd warn you against three things:
    1) A UML diagram is always, and almost always purposefully, uncomplete: a class diagram represents one aspect of classes, but not necessarily all the features and associations of these classes. You may very well have a diagram that shows a unidirectional association (because for the purpose of what the diagram illustrates, only that direction is meaningful, while another diagram shows an association in the opposite direction, for another purpose.
    I know in your example you already have a bi-directional association, I just want to point out that you do not convert one diagram to code, you merely convert a model (~ a set of diagrams) to code.
    2) Depending on the diagram's intent (e.g. domain class diagram vs design class diagram), not all associations translate to references. For example, depending on how the Customer and Order instances are created, fetched, used,... you might end up with classes that don't even know eachother (and that are simply used jointly by a higher level business logic class, say DatabaseRetriever ). OK that's a bit far-fetched, but again a diagram, especially a class diagram, does not necessarily express code, merely concepts. Again convert the model (set of diagrams), not one single diagram.
    3) A class diagram says little about the business logic of the various classes. Sequence or collaboration diagrams give more insight on the business logic. You might think that the class diagrams translate to structure, and the sequence diagram, to method bodies, but that's not that simple: for example the class diagram does not say whether the number of Order instances may change for a given Customer instance: if so, you'd better use a dynamic collection of orders in that latter, such as a <tt>List<Order></tt> rather than a fixed-length array <TT>Order[]</TT> .
    Again don't convert a diagram, instead convert a model (set of diagrams, both structure diagrams and dynamic diagrams).
    J.

Maybe you are looking for