Universal object versus multiple varaibles

Hello
im currently developing some data management system wich stores and gets varius datatypes both primitive and higher level objects.
therefor i implemented a class 'datatype' compareable with these fields:
final static int TYPE_INT=0;     
final static int TYPE_DOUBLE=1;
final static int TYPE_BOOL=2;
final static int TYPE_STRING=3;
final static int LEN_INT=4;
final static int LEN_DOUBLE=8;
final static int LEN_BOOL=1;
final static int LEN_STRING=0;
final static int MAX_STR_LEN=255;
public int type,size; //these are public for faster access. they are vital to the performance
Object value;now if i want to compare eg an int with a double in compareTo(datatype op) i have to perform massice casting and wrapper-instancing like:
case TYPE_INT:
   switch(op.type){
//not sure if this linde  is 100% correct, i just want to ilustrate the idea
    case TYPE_DOUBLE: return (int)((double)((Integer)(value).intValue())-((Double)value).doubleValue())
}so i figured it may be better to have multiple fields in the datatype object, one for each primitive datatype like:
int intVal;
double doubleVal;
String stringVal;
and only set one at a time.
anyone has an idea how memory-consuming this may be?
does defineing a primitive data without init. it does consume memory?
its highly possible to have more then a thousend datatpy objects at a time so this is important to me.

//these are public for faster
access. they are vital to the performance
Object value;Are you absolutely sure about the above? Offhand I'd have to say that's pretty unlikely.
so i figured it may be better to have multiple fields
in the datatype object, one for each primitive
datatype like:
int intVal;
double doubleVal;
String stringVal;
and only set one at a time.Don't take this too hard but it looks like you are programming "FecalMatter V0.1"
anyone has an idea how memory-consuming this may be?
does defineing a primitive data without init. it does
consume memory?yes.
its highly possible to have more then a thousend
datatpy objects at a time so this is important to me.And if each of these Objects took up 1K an thousand of them would be 1 whole megabyte. That's sure to crush your Commodore 64.

Similar Messages

  • Create a universe based on multiple existing universes

    I have a BI 4 SP02 installed in Windows OS. I am using Information design tool to create data foundation to connect to multiple data sources. Instead of using multiple database connection, can I create a data foundation to connect to multiple universes. My intention is not to create new universe based on multiple databases. Instead, I want to combine two existing universes as one and create report from that. Is it possible to do? if so, may I know how to do that?
    Thank you

    Hi
    If you want to combine two universes and make a report of it, it is possible by universe linking concept.
    If you have two universes for example, then these two universes have to be linked by using any of these two methods.
    1. Add link
    2. Include link
    Add Link : Complete reusing of an existing universe in the current universe.
    Steps
    1. File > parameters > link tab> Add link> browse for the universe> open > ok.
    Then make the join between the common object.
    Save and export.
    Include link: Partially reusing of the existing in the current universe with few modifications.
    Steps
    1.File > parameters > link tab> Include link> browse for the universe> open > ok.
    Hope it helps.

  • Universe Object Count Limit

    Hi,
    In our sales database, for each department we track sales based on the sales channels that are used (direct to consumer, retail, warehouse etc). Each channel has its own extensive list of aggregates, measures, filters etc and is contained in its own root level folder. We initially created a single universe containing 2 of these channels since that's all we were tracking. Our analysts frequently need to write reports that contain objects from multiple channels.
    As we have started tracking more channels, the question that has come up is that should we create separate universes or keep cramming those new channels into the same universe?
    1) Is there a BO recommended object count in a single universe?
    2) If we choose to have one giant universe with more than 1000 objects , other than maintanability, is there any other performance concerns or othet negative implications?
    Thanks for any suggestions.
    We are using BOXI 3.1 SP4

    Hi Ganesh
    I dont think that should be a problem from the performance side as Universe is a semnatic layer. Not the actual Data base where you start thinking of overloading. In regarding the count limit i do not have the exact number but in my present universe which is being used since two years has more than 1000 objects.
    The only thing that will cause a problem is regarding the tracking of these objects. For this you can maintina proper class structures and then this will make life easy
    Regards
    Shyam Rapeti

  • Having one single tablespace versus multiple tablespace?

    My database version is
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    My os version is
    Linux damdat01 2.6.18-128.7.1.el5 #1 SMP Wed Aug 19 04:00:49 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
    My database is OLP system.
    My question is what are the advantages and disadvantages having one single tablespace versus multiple tablespace?
    Easy to maintain when you have single tablespace. but hard to track the IO issues.
    Any other input from any one? Please let me know.

    Billy  Verreynne  wrote:
    EdStevens wrote:
    Does the term "keeping all your eggs in one basket" mean anything ....Well, in the majority of cases, even when using multiple tablespaces they will be on the same storage array or same file system. So the "+all eggs in one basket+" goes a lot a deeper down the storage layer than just the top part where you deal with logical tablespace storage containers.
    Absolutely. Except for the bazillion microscopic solid-state switches and a layer of rust on a spinning platter, everything else is just layers of abstraction. One's thinking and frame of reference depends on what layer of abstraction one is dealing with.
    The major problem with multiple tablespace for a single application And here is where there was some 'fuzz' in the OPs question. I don't recall him specifying one TS per application. Maybe he assumed that, but I read it as one (user) TS per database.
    a) deciding the space allocation of each tablespace
    b) managing what is created in which tablespace
    This comes down do an issue of micro-managing space versus simply chucking everything into a single container and let god ASM/Oracle/LUN/driver/whatever sort them out.
    Issues like transportable tablespaces... separating your logical data into different containers... and the like? That is not really sufficient justification to me for having to micro-manage space for a 101 tablespaces. This simply creates a huge workload on the space management part of the database - that is complex and difficult to deal with. Free space from an underutilised (incorrectly sized) tabelspace cannot simply be moved and reallocated to a tablespace stressed for more space. Everything but...
    Which is why I prefer having fewer tablespaces as this means not having to micro-manage space and continually having to wave a threatening lead pipe around to make sure that applications and developers play rigidly within the large set of strict rules of how these many tablespaces are to be used.Agreed. One can go way overboard, and a lot of this discussion hinges on the OP's intent, as I mentioned above -- one TS per ... what? My default position is one TS per application schema. Normal human users all default to one USERS ts, but don't have any quota because they don't have any reason to create objects.

  • Design Pattern: Is the Universe Object a Singleton or Static or either way.

    Hi All,
    1. I've read this thread: static versus singleton
    http://forum.java.sun.com/thread.jsp?forum=425&thread=401035&tstart=105&trange=15
    2. Now, specifically if you were to model the Universe Object, what would you choose? a Singleton
    or a Static Class or either way depending on your design point of view?
    (either way depending on your design point of view imply there is more than one solution to a problem.)
    Basically, I'm looking for is the justification of one (singleton) or the other (static) or doesn't matter
    in addition to the pure technical pros and cons (or avantage/disavantage) of singleton versus Static (see pt. 1)

    <dubwai>
    What's 'the Universe Object'?
    </dubwai>
    Sorry, for not being clear. My assumption is that every body would undertand the word 'Universe' immediately. So with this clarification. I hope you will have more input. Thanks.
    public class Universe //Singleton
         private static Universe instance = new Universe(); 
         private Universe()
         public static Universe getInstance() 
           return instance;
         public void do() 
    public class Universe  //Static Class like Math class for example
         public static void do() 
         ...all other methods are static
    <os>
    Personally, I'd make the universe a singleton.
    The universe is an 'object', not a class, and if alternate universes are proved to exist you can create new instances,
    and not treat it as a singleton any more, without much rewriting (a static implementation would need a total rewrite).
    </0s>
    1. Keywords: Personally and alternate universes are proved to exist.
    Yes, this is the kind of reasoning I'm looking for. By that I mean when we design a class, our reasonning should not depends
    on the 'pure' technical concepts of what Singleton class or Static class can do but rather depending on the reality
    of the world. And then from that understanding we would choose a Singleton or Static class. This is what I meant by 'Either way, it doesn't matter' which depend on one's view about of existence of the universe whether it's unique or not. In your case (Os), you prefer Singleton because of the possibility of alternate universes.
    2. Now, let's admit, there is only one Universe, would you still prefer Singleton class over Static class? for all the techincal reasons that you said
    "As a singleton,..."
    "It would also probably be useful to treat the universe as a generic Object..."
    OR just because a Singleton would be 'safer' to cover the possibility of design extension in that can cover all cases (alternate as well)

  • Object with multiple states and slider in folio are rasterized, settings seem correct.

    I am having trouble keeping An object with multiple text states from being rasterized, as well as a slider that is also rastering.
    I have read that you are supposed to set the folio and article up to be .pdf and that the slider should have the vector option chosen.
    I haven't found anything for the multi state object to for these settings.
    What happens is when I output the folio to Adobe Content Viewer, only the text in those items is rasterized. All other text is crisp. Tested on both iPad Mini and iPad Retina and the both are blurry.
    Is there a way to force the vector option? It seems even with the correct options selected it is still rastering the test in interactive elements.
    Thanks!

    Here is the MSO with the folio.
    Here is the Slider with folio overlays panel.

  • Two universe objects on the same graph axis

    I am trying to create a bar-stacked graph in the Web Intelligence document. I add \[Period\] universe object to X axis, \[Total\] object to Y axis. Then I want to add two objects to Z axis:
    \[Sector\] (has values: Europe, Asia, America) and \[Status\] (has values: Active, Validating)
    The problem that it makes a cartezian product between all value, so the output is:
    Europe/Active
    Europe/Validating
    Asia/Active
    Asia/Validating
    America/Active
    America/Validating
    But, what I want is:
    Europe
    Asia
    America
    Active
    Validaing
    Is there any way to do this? Maybe with the help of some universe parameters, or REBean SDK...

    this is cross topic

  • Accessing the same object from multiple classes.

    For the life of me I can't workout how I can access things from classes that haven't created them.
    I don't want to have to use "new" multiple times in seperate classes as that would erase manipulated values.
    I want to be able to access and manipulate an array of objects from multiple classes without resetting the array object values. How do I create a new object then be able to use it from all classes rather than re-creating it?
    Also I need my GUI to recognize the changes my buttons are making to data and reload itself so they show up.
    All help is good help!
    regards,
    Luke Grainger

    As long as you have a headquarters it shouldn't be to painfull. You simply keep a refrence to your ShipDataBase and Arsenal and all your irrellevant stuff in Headquarters. So the start of your Headquarters class would look something like:
    public class Headquarters{
      public Arsenal arsenal;
      public ShipDatabase db;
    //constructor
      public Headquarters(){
        arsenal = new Arsenal(this, ....);
        db = new ShipDatabase(...);
    //The Arsenal class:
    public class Arsenal{
      public Headquarter hq;
      public Arsenal(Headquarter hq, ....){
        this.hq = hq;
        .Then in your ShipDatabase you should, as good programing goes, keep the arraylist as a private class variable, and then make simple public methods to access it. Methods like getShipList(), addToShipList(Ship ship)....
    So when you want to add a ship from arsenal you write:
    hq.db.addToShipList(ship);
    .Or you could of course use a more direct refrence:
    ShipDatabase db = hq.db;
    or even
    ShipList = hq.db.getShipList();
    but this requires that the shiplist in the DB is kept public....
    Hope it was comprehensive enough, and that I answered what you where wondering.
    Sjur
    PS: Initialise the array is what you do right here:
    //constructor
    shipList = new Ship[6];
    shipList[0] = new Ship("Sentry", 15, 10, "Scout");
    " " " "etc
    shipList[5] = new Ship("Sentry", 15, 10, "Scout");PPS: To make code snippets etc. more readable please read this article:
    http://forum.java.sun.com/faq.jsp#messageformat

  • How to identify reports that are using a specific universe object?

    Any idea how to use BO Auditor or Metadata Manager to identify webi reports that are using a specific universe object or universe prompt in the report SQL?

    Hi Samuel,
    In case you are using BOXIR2 you can do this by editing the crystalenterprise.webi.xml file.
    Replace the CrystalEnterprise.Webi.xml file (Take a backup) with the edited one.                                                                               
    Path where you can find this file- Tomcat/webapps/businessobjects/enterprise115/desktoplaunch/WEB-INF/classes/META-INF/CrystalEnterprise.Webapps/ePortfolio/plugins                                                                               
    Paste the Custom Documentation folder in Tomcat\webapps\businessobjects\enterprise115\desktoplaunch\ 
    May I know your email Id so that I can send you the edited crystalenterprise.webi.xml file.
    Regards,
    Sarbhjeet Kaur

  • Universe object that returns the number of rows in table?

    Is it possible to create a Universe object to support the following SQL query:
    SELECT * FROM (SELECT ROWNUM rownum1 FROM TABLE) WHERE rownum1 = (SELECT (MAX(ROWNUM)) FROM TABLE)

    Amr,
    Hey dude, welcome back, long time no hear from you.
    You were on the right track with "number of rows", but here is the correct syntax:
    =NumberOfRows([Query 1])
    Thanks,
    John

  • Identify reports using a specific universe object

    Hi,
    How do I find out all webi reports using a particular universe object or universe prompt in the report SQL?
    Thanks.

    Samuel,
    You might have some success working with an Excel spreadsheet which has been programmed with macros and was developed to access the CMS database and produce a universe to reporting pairing product.  The source for this spreadsheet/macro is on the BOB board, available here:
    [http://www.forumtopics.com/busobj/viewtopic.php?t=101886&postdays=0&postorder=asc&start=30&sid=41504e1606a79a263d57748b2bcd8ccc]
    Thanks,
    John

  • Copying text object to multiple still menu views

    I am fairly new to this program. I have multiple still menu views on my graphical tab. I need to change one text object for multiple still menu views at the same time. As of now, highlighting all and changing the text object only changes one view. Is this possible and does anyone know how to do this??

    You can't. Each one has to be made individually, you can of course use copy & paste to do this.

  • Passing vector of object with multiple datatype

    Hi
    I want to pass vector of objects to stored procedure and I am facing some problem
    please suggest is it possible or I need to follow some other way.
    I have one class detail with two attributes i.e int ID and string course
    In main I have created 1000 objects of different ID and course and pushed back the objects to avector of detail and passed to a function my function is
    void bulkdatainsert(vector<detail>rec)
    stmt = conn->createStatement ("begin storeBulk(:1);end;");
         stmt->setMaxIterations(rec.size());
         stmt->setMaxParamSize(1,1024);
         setVector(stmt,1,rec,"course"); // The error coming here
    The error is due to the type rec .
    I want to know can we pass objects of multiple data to stored procedure through OCCI ?
    If not do we need to break every attribute and make vector of corresponding attributes and pass to stored procedure?
    please suggest me
    Thanks

    I think Custom objects are not supported directly.
    Following are the normal ones which you can use
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector< T > &vect,
    const string &schemaName,
    const string &typeName);
    Intended for use on platforms
    where partial ordering of function
    templates is not supported, such
    as Windows NT. Multibyte
    support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<T* > &vect,
    const string &schemaName,
    const string &typeName);
    Intended for use on platforms
    where partial ordering of function
    templates is supported. Multibyte
    support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<BDouble> &vect
    const string &sqltype);
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Bfile> &vect,
    const string &schemaName,
    const string &typeName);
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<BFloat> &vect
    const string &sqltype);
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Blob> &vect,
    const string &schemaName,
    const string &typeName);
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Blob> &vect,
    const UString &schemaName,
    const UString &typeName);
    Sets a const Blob vector; UTF16
    support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Clob> &vect,
    const string &schemaName,
    const string &typeName);
    Sets a const Clob vector;
    multibyte support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Clob> &vect,
    const UString &schemaName,
    const UString &typeName);
    Sets a const Clob vector; UTF16
    support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Date> &vect,
    const string &schemaName,
    const string &typeName);
    Sets a const Date vector;
    multibyte support.

  • Function to show Universe Objects used by reports

    Is there a function in XI3.1 to see all of the reports in which a particular Object is being used?
    I don't see any of the canned audit reports that would show this.
    Example: I have a Universe Object called "Ins. Proper Name'' and I want to see how many of our reports are using this object.
    Thanks,
    Mike

    Mike,
    Here is what I use:
    Result Objects:
    -Universe Name from Actions/Action Details
    -Action Type from Actions
    -Document Name from Actions/Document Operation
    -Action Time from Actions
    -Action Type Detail from Action/Action Type
    Query Filters:
    -Action Time Between <Begin Date> and <End Date>
    Report Filters:
    -Action Type In List: SQL Value
    Note: Action Type Detail contains the SQL for every query that is run within the date range provided. While the SQL contains the name of every query in every report, it does not use reference a universe object by name. i,e, to check whether a specific universe object exists in the report, you will have to search for the object's sql.
    Also, I use an additional another query filter to return only objects that match a specific pattern.
    Let me know if you need anything else.
    Best,
    Srinivas

  • Dimension vs Detail Universe objects

    What are the pros and cons of creating Dimension vs Detail Universe objects?
    We have created our Universes with both types to logically group some dimension objects with details that can only be one value of it's associated dimension object. We have found that in Webi, Detail objects cannot be merged where two or more queries are written. We are on XIR2 SP2 and are planning to upgrade to XI 3.0 soon. Are any issues resolved in XI 3.0?
    Any response would be appreciated.
    Thanks,
    Mike

    Jacques,
    Thanks for the helpful reply.  If I could as an example, we have several instances where we have defined dates as dimension objects in a universe.  Of course a date can have many detail attributes and for these we created them as attributes under the date dimension.  So for dimension Month_End_Date we have attributes such as Month_End_Date_Year or Month_End_Date_Quarter; and as mentioned we cannot merge on these attributes.  Perhaps one persons dimension is anotheru2019s attribute; potato, potahto.  While still somewhat of a newbie with Business Objects it just seems that merging of attributes should be allowed. 
    Again thanks for your earlier reply and listening to me rant a little.

Maybe you are looking for

  • Keep getting error message from 'Cron Daemon'

    I have been running an Xserve G4 with Mac OS X Server 10.3.9 as a mail server and web server for several years now with no problems. Recently, however, I tried to set up a mailing list, which I had never done before. When I tried doing this, OS X aut

  • Grey where there should be photo?

    Ok I have a Macbook Air (OS X version 10.6.7) and a Canon DIGITAL IXUS 70. So today I tried to import 59 photos. They all appeared in preview. I then opened iPhoto and clicked import Canon DC, but when the items imported only 5 photos appeared the re

  • Oracle 9i application down

    Hi, we are using oracle 9i application and 9i database. yesterday application was down automatically. i started it by opmnctl startall command after it I checked in server.log file in the /../j2ee/OC4J_BI_Forms/log/OC4J_BI_Forms_default_island_1/serv

  • When I import TIF and JPG files with same metadata, only the TIF files are imported. How can I change that?

    I have imported and renamed TIF and JPG files with the same metadata re recording date and time. Only the TIF files are imported, the JPG files remain unimproved. Thus I have in the Finder e. g. 13 image files in the same folder in which Lightroom on

  • CANCELLED ACCOUNT- STILL BEING CHARGED, CAN'T CANC...

    Hi, i cancelled my skype account in september and still have the email from skype verifying i cancelled. my credit card IS STILL BEING CHARGED and i cannot cancel my subscription. i get an error message. PLEASE HELP!!! Terrible non-existent customer