Public synonyms- when it is good/bad practice

When would you say that public synonyms that (reference tables) are a good things, recommended things?
I understand that mostly public synonyms are like triggers that should be avoided. Because they create possibility of confusion that one is not sure what is he referencing, if there is in two schemas table with same name, and code is written without schema prefix to reference those tables.
I understand that if lot of code have written without schema prefix and now a table is planned to move to other schema, then it is perhaps good to create the public synonym so that code that was referencing without schema prefix a table can work successfully still.
Can you explain generally when you would use public synonyms, in which situations?

Yes you are right.
The public synonyms can confuse us sometimes. the creation of public synonyms are useful when you are using the DBlinks from one database to another to read or write records. Because specifying the DBlink name at every time is not possible we may forget to use it as @dblink; at quries.
In this case it is useful.
While refreshing schemas to another database you have to take care these public synonyms to be created in new database also.
Thanks

Similar Messages

  • Workaround good/bad practice or does it not matter...??

    Hi,
    I have a project that requires other shared actions to hide./show something and was wanting a quick workaround for Hide 1 show 9 so I did as follows..(bear in mind I am using CP7 not 8)
    I copied my hide1 show 20 slide from another project, which retains the connection between buttons and images etc, but as this was too many for my other project, I just set things on the copied slide not to  displlay in output etc adn then renamed the ones I wan to refer to in the new project adn it all works great, however, if wer are doing this is this bad practice as any other CP editor further down the track, needs to edit the project, might think that this is a mess and mish mash with ttoo many objects (although hidden) on the slide and maybe make it more difficult for them.
    My initial thinking on that is while it may look a bit of a mess, My approach to any exising project is to deconstruct it to see exactly what is going on, but some otheres might just look at it as a real pain. (I did it this way as I could not edit a shared action in CP7)
    So, I was just wantig to pose this question to the community and get any feedback on your thoughts about this approach...? (I hope I have explained this correctly and is understandable etc)
    Cheers
    Rossco

    Hi Lilybiri,
    Sorry for the delay in responding.
    I would be interested in your workflow for editing shared actions.
    Hopefully this will be clearer for my explanation of how I initially thought of for editing my shared action...please let me know if this is still not clear.
    I had a Show 1 Hide 20 shared action, using smartshapes as buttons and aside from checkmarks (Ticks) and other images etc.
    I needed to create another similar advanced/shared action, but did not have the time to do so, I needed to just change the existing shared action.
    To do this, I copied the shared action to another project and tried to think of a way I can edit this just by changing the items on the slide. So I tested it out, by selecting a  number of images/buttons and making the ones I did not need, to not be buttons and to not show in output, then just renaming the ones I wanted to show etc...
    And it worked well, so I was happy with that outcome. It may have taken me a while to figure it out initially, but now I know it can be done :-)
    The only negative that some of my colleagues have said, are as follows,with my response back to them.
    Issue: The slide will be a mess as all those items/images are still on it. My response:You can hide the items not used so the slide will not look messy to another CP editor.
    Issue: the images etc will make the file too big and unwieldy My Response: remove the images not needed and the file size will not be a problem.
    Issue: File will be messy for another CP editor to change and take un-necessary time. My Response: Anyone who is a CP user, will/should know how to deconstruct and edit an existing file.
    I hope that makes it clearer :-)
    Cheers
    Rossco

  • Good programming practices:   creating Iterator objects

    Hi,
    This is a question about Good programming practices for creating Iterator objects of ArrayList objects. The following line of code works fine in my program (as ridiculous as it may sound):
            Iterator cheesesIterator = cheeses.iterator();but I was wondering whether Java is automatically inserting the <Type> and new code to make:
            Iterator<String> cheesesIterator = new cheeses.iterator();and therefore whether it is good practice to use these everytime? Thank you. ("full" code shown below:)
    import java.util.ArrayList;
    import java.util.Iterator;
    public class DemonstrateIterator
        private ArrayList<String>  cheeses;
         * constructor:
        public DemonstrateIterator()
            cheeses = new ArrayList<String>();
            cheeses.add("Emmentaler");
            cheeses.add("Cheddar");
            cheeses.add("Stilton");
            cheeses.add("Brie");
            cheeses.add("Roquefort");
        public void listCheeses()
             //make an iterator object of the ArrayList object
            Iterator cheesesIterator = cheeses.iterator();
            while (cheesesIterator.hasNext()) {
                System.out.println(cheesesIterator.next());
            /** Exploring the toString and Super functions. **/       
            System.out.println("\na toString call to Super returns: " +
                                              super.toString() + "\n");
    }

    AJ-Phil wrote:
    Hi,
    This is a question about Good programming practices for creating Iterator objects of ArrayList objects. The following line of code works fine in my program (as ridiculous as it may sound):
            Iterator cheesesIterator = cheeses.iterator();but I was wondering whether Java is automatically inserting the <Type> and new code to make:
            Iterator<String> cheesesIterator = new cheeses.iterator();and therefore whether it is good practice to use these everytime? TFirst, new chesses.iterator() won't compile.
    iterator() is just a method that returns an iterator. It constructs an instance of a private or nested class that implements iterator, and returns a reference to it.
    As for the <T>, when you declare List<String>, that parameterizes that list with type String. The iterator() method returns Iterator<T>. You can look at the source code for yourself. It's in src.zip that came with your JDK download.
    Separate from that is your declaration of that variable as type Iterator, rather than Iterator<String>. Regardless of what you declare on the LHS, the iterator() method returns Iterator<T>. Your bare Iterator is essentially Iterator<Object> or Iterator<? extends Object> (not sure which, or what the difference is), which is assignment compatible with Iterator<T>. If you had declared it Iterator<String>, you wouldn't have to cast after calling next().
    Edited by: jverd on Nov 23, 2008 11:33 AM

  • Force quitting InDesign as a Matter of Routine. Bad Practice?

    I am trying to convince InDesign users here (CS4, CS5) that using Force Quit as a matter of routine for quitting out of InDesign at the end of the day is a bad practice. I think this started because when we were using K4 (enterprise InCopy/InDesign plug-ins), InDesign DID take a long time to quit because of communication to the K4 database and disconnecting.
    I need some good evidence to convince everyone to quit out of InDesign normally. And also other programs they use. My argument is that when InDesign quits, it updates its preferences and perhaps may even clean something up. Anyone know?

    I work on local files only, and I still have to either leave my desk for 10 minutes after I try to quit then shut down, or force quit and shut down. I do work on some large files though (50-100 meg catalogs) with lots of photos linked in. I guess it takes forever to clear all the cached memory or something. If I try to do a shutdown with InDesign open. I always get a time out error. Also when I go back to InDesign after working in Photoshop, FreeHand, Entourage or FireFox it takes a long time to redraw the InDesign screen and menus.
    I also have a couple of indexing scripts, but don't run them often. Don't see how that would affect anything.
    I read a post somewhere that you could change the "Live Screen Redraw" setting to help with the slowness, but I cannot find that setting in CS3. It may only be in later versions.
    Thanks,
    BJ
    iMac 2.1 GHz PowerPC G5
    Mac OS 10.4.11
    1 GB DDR2 SDRAM (that's wierd, I thought I had 2 GB)

  • Is it bad practice to capture an image that was deployed from mdt after adjustment?

    is it bad practice to capture an image that was deployed from mdt after adjustment?
    or there is no any consequences?
    &quot;When you hit a wrong note it's the next note that makes it good or bad&quot;. Miles Davis

    During years I never captured the image deployed from mdt.
    Today was a rush.
    The request:
    to install time consuming configuration application into the image.
    I restored acronis image that used during couple of weeks for captures after small changes.
    And decided to capture it again before the installation of local progam and final capture.
    It failed after multiple trials. I posted the error yesterday here:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/a702bf17-8375-4bc7-b458-8ce4894f99e9/error-2147467259-during-capture?forum=mdt
    As a last tip before suggesting to deploy existing image and sysprep it 20 times I deployed the image from MDT applied just Windows KBs and captured again with MDT it worked without any prob.
    So against my usual habit I gave a deployd image for installing the tricky software and then will capture it for future deployment for 20 "special" computers. Feel not so good. But like you told:
    "Will it hurt anything?  Probably not"     I took a chance. In the image no AV, just small things like 7Z and Adobe.
    Encourage me for this case :)
    Thanks.
    &quot;When you hit a wrong note it's the next note that makes it good or bad&quot;. Miles Davis

  • Good programming practice - Abstract class

    Hi all,
    I have been trying to help another soul in this forum, and came to the conclusion that I don't know good
    programming practice when it comes to abstract classes.
    Is this correct?
    You CAN implement methods in an abstract class, but it's not recommended.
    I have NEVER done this...when is there possibly a need to?
    Regards.
    / k

    Yes, absolutely, you can implement methods in an abstract class. Any method that all subclasses will perform in the same way can be implemented in the abstract base class. If subclasses perform similiar functions depending on their type you declare those as abstract in the base class. Here is a contrived example that I have seen on job interviews.
    Suppose your developing an application that draws on a panel. We want to provide some canned shapes such as a circle, a square and a triangle. We want to be able to draw the shape set or get its color and calculate its area.
    Let's define an abstract base class Shape
    public abstract class Shape{
        private Color myColor;
       //  since color has nothing to do with what kind of shape we're working with, create concrete implementation
       public Color getColor(){
            return myColor;
    public void setColor(Color newColor){
       myColor = newColor;
    // however, drawing the shape and calculation its area are depending on the actual shape.
    public abstract void draw();
    public abstract double getArea();
    // so then Square would be something like
    public class Square extends Shape{
       public double get Area()
          return sideLength * sideLength  // assumes somehow we know sideLength
    public void draw(){
                  // concrete implementation
    }we can do the same things for Circle class and Triangle class.
    And, if you think about it you'll notice that we could have made a Rectangle class and then Square would be a subclass of Rectangle where both dimensions are equal.
    I hope that somewhat strained example helps answer your question.
    DB

  • Hi, I'm designing my 1st website and I started it in  photoshop cs5.5. I know that it's bad practice

    Hi, I'm designing my 1st website and I started it in  photoshop cs5.5. I know that it's bad practice to build with images, I learned this too late. I imported my site into Dreamweaver cs5.5 and uploaded it to my server. The problem I'm having is that I want to apply a jquery drop down menu bar but whenever I try, I get white gaps within my page. How do I convert the coding into a functioning site?*Help Please*  The URL to my site is: http://www.coriemoment.com and this is my coding:
    <html xmlns="http://www.coriemoment.com"
    <head>
    <title>The Official Corie Moment Home</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
        <div id="=container"
    <body bgcolor="#FFFFFF" leftmargin="auto" topmargin="auto" marginwidth="auto" marginheight="auto" margin:0;>
    <!-- Save for Web Slices (home.psd) -->
    <table id="Table_01" width="1281" height="768" border="0" cellpadding="0" cellspacing="0">
              <tr>
                        <td colspan="6">
                                  <img src="images/index_01.png" width="1280" height="220" alt=""></td>
                        <td>
                                  <img src="images/spacer.gif" width="1" height="220" alt=""></td>
              </tr>
              <tr>
                        <td rowspan="4">
                                  <img src="images/index_02.png" alt="" width="414" height="548"></td>
                        <td rowspan="3">
                                  <object width="564" height="423"><param name="movie" value="http://www.youtube.com/v/XbuQiJ6Sv_M?hl=en_US&version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/XbuQiJ6Sv_M?hl=en_US&version=3" type="application/x-shockwave-flash" width="564" height="423" allowscriptaccess="always" allowfullscreen="true"></embed></object></td>
                        <td colspan="3">
                                  <img src="images/index_04.png" width="255" height="89" alt=""></td>
                        <td rowspan="4">
                                  <img src="images/index_05.png" width="46" height="548" alt=""></td>
                        <td>
                                  <img src="images/spacer.gif" width="1" height="89" alt=""></td>
              </tr>
              <tr>
                        <td rowspan="2">
                                  <img src="images/video_03-07.png" width="1" height="336" alt=""></td>
                        <td rowspan="3">
                                  <img src="images/index_07.png" width="34" height="459" alt=""></td>
                        <td>
                                  <script src="http://widgets.twimg.com/j/2/widget.js"></script>
    <script>
    new TWTR.Widget({
      version: 2,
      type: 'search',
      /*put your twitter id that people use to reply to you below. Mine is mhorning. If you only want to see the Tweets that you have Tweeted, then delete the part below that says- OR to:coriemoment */
      search: 'from:coriemoment OR to:coriemoment',
       /*this is the duration in terms of seconds*/
      interval: 30000,
       /*this is the title you want on your tweets*/
      title: 'Corie Tweets',
      subject: 'Send us your comments',
       /*setting width to 'auto' will adjust the width of your tweetbox to whatever is set on your div. You can change this to something like 500px if you want*/
      width: 'auto',
      height: 212,
      theme: {
        shell: {
                 /*this will change the background color of your tweetbox. It is currently yellow*/
                background: 'body p, body img, body embed, body object, body video{opacity:1 !important}',
          /*this will change the color of the text in your background*/
                color: 'fac935'
        tweets: {
                 /*this will change the background color behind your tweets. It is currently white*/
                background: 'body p, body img, body embed, body object, body video{opacity:0.2 !important}',
           /*this will change the color of the text in your tweets. It is currently black*/
                color: '#000000',
           /*this will change the color of anything that is hyperlinked in your tweet. It is currently blue*/
                links: '#1985b5'
      features: {
        scrollbar: false,
        loop: true,
        live: true,
        behavior: 'default'
    }).render().start();
    </script></td>
                        <td>
                                  <img src="images/spacer.gif" width="1" height="302" alt=""></td>
              </tr>
              <tr>
                        <td rowspan="2">
                                  <img src="images/index_09.png" width="220" height="157" alt=""></td>
                        <td>
                                  <img src="images/spacer.gif" width="1" height="34" alt=""></td>
              </tr>
              <tr>
                        <td colspan="2">
                                  <img src="images/index_10.png" width="566" height="123" alt=""></td>
                        <td>
                                  <img src="images/spacer.gif" width="1" height="123" alt=""></td>
              </tr>
    </table>
    <!-- End Save for Web Slices -->
    </body>
    </html>

    mazz2000 wrote:
    The best way to do it is go back to PS and place the navigation area in the design, i would make it 100% of the width and then re-slice the design making sure one single slice is the whole of this navigation area.
    That would be the best way to do it while still using a table layout which in and of itself is not recommended, in large part  for this very reason.
    Every time you want to make a small change to the layout of your site, it will require re-slicing and re-generating code out of PS. You would be much better off taking the time to understand css layouts. Here is a good place to start to get the basics of css: http://www.w3schools.com/css

  • Create a view based on a public synonym

    Hi I'm trying to create a view based on a public synonym, but getting "ORA-01031: insufficient privileges" error.
    When i retrieve records from the same public synonym, i could able to do so. But when i try to create a view based on that synonym, it is not possible. Why is it? Can anyone please explain?
    11:58:04 IT00053.it0053@SCOTT> connect sys as sysdba
    Enter password: ******
    Connected.
    11:58:14 IT00053.it0053@SYS> create role general_user_role;
    Role created.
    Elapsed: 00:00:00.14
    11:58:33 IT00053.it0053@SYS> connect scott
    Enter password: *****
    Connected.
    11:58:41 IT00053.it0053@SCOTT> select * from tab;
    TNAME TABTYPE CLUSTERID
    DEPT TABLE
    EMP TABLE
    BONUS TABLE
    SALGRADE TABLE
    DEPT_TAB SYNONYM
    Elapsed: 00:00:00.01
    11:58:47 IT00053.it0053@SCOTT> create public synonym scott_emp for scott.emp;
    Synonym created.
    Elapsed: 00:00:00.06
    11:59:14 IT00053.it0053@SCOTT> grant select on scott_emp to general_user_role;
    Grant succeeded.
    Elapsed: 00:00:00.14
    11:59:35 IT00053.it0053@SCOTT> connect sys as sysdba
    Enter password: ******
    Connected.
    12:00:13 IT00053.it0053@SYS> create user beginning_user
    12:00:31 2 identified by beginning_user
    12:00:38 3 default tablespace users
    12:00:45 4 temporary tablespace temp;
    User created.
    Elapsed: 00:00:00.04
    12:00:53 IT00053.it0053@SYS> grant connect, resource, create table, create view to beginning_user;
    Grant succeeded.
    Elapsed: 00:00:00.01
    12:01:13 IT00053.it0053@SYS> grant general_user_role to beginning_user;
    Grant succeeded.
    Elapsed: 00:00:00.01
    12:01:35 IT00053.it0053@SYS> connect beginning_user/beginning_user
    Connected.
    12:01:49 IT00053.it0053@SYS> connect beginning_user
    Enter password: **************
    Connected.
    12:02:01 IT00053.it0053@SYS> show user
    USER is "BEGINNING_USER"
    12:02:06 IT00053.it0053@SYS> select * from scott_emp;
    EMPNO ENAME JOB MGR HIREDATE SAL
    COMM DEPTNO
    7369 SMITH CLERK 7902 17-DEC-80 800
    20
    7499 ALLEN SALESMAN 7698 20-FEB-81 1600
    300 30
    7521 WARD SALESMAN 7698 22-FEB-81 1250
    500 30
    7566 JONES MANAGER 7839 02-APR-81 2975
    20
    7654 MARTIN SALESMAN 7698 28-SEP-81 1250
    1400 30
    7698 BLAKE MANAGER 7839 01-MAY-81 2850
    30
    7782 CLARK MANAGER 7839 09-JUN-81 2450
    10
    7788 SCOTT ANALYST 7566 19-APR-87 3000
    20
    7839 KING PRESIDENT 17-NOV-81 5000
    10
    7844 TURNER SALESMAN 7698 08-SEP-81 1500
    0 30
    7876 ADAMS CLERK 7788 23-MAY-87 1100
    20
    7900 JAMES CLERK 7698 03-DEC-81 950
    30
    7902 FORD ANALYST 7566 03-DEC-81 3000
    20
    7934 MILLER CLERK 7782 23-JAN-82 1300
    10
    14 rows selected.
    Elapsed: 00:00:00.21
    12:02:16 IT00053.it0053@SYS> create or replace view new_view_1 as select empno, ename, job from
    12:02:50 2 scott_emp;
    scott_emp
    ERROR at line 2:
    ORA-01031: insufficient privileges
    Why is this error?
    Your help will be much appreciated...
    Thanks and regards
    Muthu

    create any view privilege
    10:15:07 IT00053.it0053@SYS> connect sys as sysdba
    Enter password: ******
    Connected.
    10:22:27 IT00053.it0053@SYS>
    10:22:28 IT00053.it0053@SYS>
    10:22:28 IT00053.it0053@SYS> grant create any view to beginning_user;
    Grant succeeded.
    Elapsed: 00:00:00.00
    10:22:53 IT00053.it0053@SYS> connect beginning_user/beginning_user
    Connected.
    10:22:59 IT00053.it0053@SYS> create or replace view new_view_1 as select empno, ename, job from scot
    t_emp;
    create or replace view new_view_1 as select empno, ename, job from scott_emp
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ---> Same result
    But When creating a view, the owner must have granted the select directly.
    10:23:08 IT00053.it0053@SYS> connect scott/tiger
    Connected.
    10:25:43 IT00053.it0053@SCOTT> grant select on scott_emp to beginning_user;
    Grant succeeded.
    Elapsed: 00:00:00.07
    10:26:14 IT00053.it0053@SCOTT> connect beginning_user/beginning_user
    Connected.
    10:26:19 IT00053.it0053@SCOTT> create or replace view new_view_1 as select empno, ename, job
    10:26:25 2 from scott_emp;
    View created.
    Elapsed: 00:00:00.03
    This works. Thanks a lot for your timely help.
    danke shun herr bochum. thanks to mr.ankara

  • DB Links vs. Public Synonyms Security issue

    I have been debating on using either a public synonym or a db link for my purpose. I have a dev, test, and prod database. I have applications that have been developed using a public synonym. I know that if I were to switch to db links I would have to go back and change the applications to have access to the tables. I was wondering if it would be more secure to just have the public synonyms with select privilege or have db links. I need to decide if I should use db links for various users in the same DB (e.g. prod) and to use db links from one DB to another. Can someone explain what the security risks are between the two and which would be safer to use?
    Thanks

    I appreciate that you have taken the time to read my post. The version of the database I am using is 10g. I guess to clarify my post I am asking if someone can provide me advantages and disadvantages of using either public synonyms or db links. I don't know if I am clear, but when I refer to a DB Link I am referring to the following type of access where a client in a database A can access information in a remote database B (e.g. schema1.table2@databaseB). I am not sure what you mean by "Database links are two entirely different technologies that do two entirely different things". But I would appreciate if someone with DBA experience can provide some insight regarding security issues associated with using public synonyms and db links.
    Thank you,

  • DB Link Public Synonym

    Hi Guys
    I have a public SYNONYM that was created to access a table on the remote database using a DB Link.
    We are able to access the DB Link using SQL Plus and the Synonym BUT when the same is used inside the cursor query of a PL/SQL block we get the following error message!
    This is driving me crazy... need your expert suggestion :)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Errors for PROCEDURE SP_PROCESS_SESEBA031:
    59/12 PLS-00341: declaration of cursor 'V_CUR' is incomplete or
    malformed
    60/9 PL/SQL: ORA-01775: looping chain of synonyms
    60/9 PL/SQL: SQL Statement ignored
    95/15 PL/SQL: Item ignored
    123/9 PL/SQL: SQL Statement ignored
    124/18 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    127/9 PL/SQL: Statement ignored
    127/12 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    148/13 PL/SQL: SQL Statement ignored
    161/37 PL/SQL: ORA-00904: "V_DTL_REC"."TRADE_DATE": invalid identifier
    161/37 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    180/9 PL/SQL: Statement ignored
    180/53 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    182/9 PL/SQL: SQL Statement ignored
    213/14 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    213/24 PL/SQL: ORA-00984: column not allowed here
    Compile source: /usctreg1/app/db/proc/SP_PROCESS_SESECRC.src
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Thanks & Best Regards,
    Faisal.

    Hi,
    As I say, when we access the synonym (that links to a table through a DBLINK) we have this issue. The code can be as simple as
    DECLARE
    var1 int := 0;
    CURSOR S1 IS SELECT col1, col2 from TB_DBLINK;
    BEGIN
    LOOP through Cursor S1
    END;
    Here the TB_DBLINK is:
    CREATE PUBLIC SYNONYM TB_DBLINK FOR TB_DBLINK@DBL1
    The TB_DBLINK on the DBL1 is also a Public Synonym... So it means that a Public Synonym is being created for a Public Synonym!
    Able to access this using SQL Plus simple select though :(

  • JDev app wizard unable to see public synonyms

    When running through reverse engineering to create middle-tier entities/views/assoc/links, the wizard was unable to give me the option of choosing from among public synonyms. I checked under SYSTEM, SYS users but the synonyms I wanted did not appear.
    When I created non-public synonyms in a schema, JDev did find them.
    PS: The synonyms access tables and views on another server using database links.
    null

    Are you logging on as yourself or as the owner of the objects? If you are logging on as yourself then you will only see the objects owned/created by you.
    If you want to see objects owned by other users click "other users" and click on the user that owns the objects that you want to view. If you do not have 'select' privs on the object then you will not be able to see the object in another users account.

  • Is this bad practice?

    Consider the follwing two classes:
    public class Widget
    public class CustomWidget extends Widget
    }Now consider another class that has a Widget class member:
    public class OrdinaryClass
      private Widget w = new Widget();
      public Widget getTheWidget()
        return w;
    }Now suppose I were to subclass OrdinaryClass as follows:
    public class SpecialClass extends OrdinaryClass
      private CustomWidget cw = new CustomWidget();
      public CustomWidget getTheWidget()  // violate LSP?
        return cw;
    }My questions are:
    1) does SpecialClass violate Liskov's Principle in that the getWidget return type has changed?
    2) if it's not in violation, is it bad practice anyway? Or is this some polymorphic trick that is not only acceptable, but very useful (and encouraged)?
    Please advise.

    A custom model was subclassd from AbstractListModel.
    One of the getter methods from ALM has a return of
    f type Object. The custom model used the same
    getter, but returned the toString() of the Object (a
    property) instead of the Object in its entirety.Given this specific class hierarchy, you're into territory for design lawyers. A list mode maintains data that's used by a JList[i/]. The contract, as a result, is fairly open, and you could define the model as maintaining string representations for an object. The purists would respond with "no, the view should decide the representation," and I'd probably agree with them.
    By comparison, the contract for a [i]java.util.List is much more explicit: you put objects into the list, and you get the same objects out. If your colleague was creating a List implementation that returned toString() of an object rather than the object itself, then your argument would have much more force.
    It seems as if changing the return type of a method
    in a subclass seems wrong, even if the new return
    type is a sub of the original return type.
    I have nothing against returning the subclass, mind
    you. Just keep the contract (i.e, the return type)
    the same.However, the "contract" is not defined just by method signature. If that were the case, then this would be a perfectly valid implementation of List.get():
    public Object get(index i)
        return new Integer(i);
    }Instead, the "contract" is defined by the class as a whole, and furthermore is defined by your application for each instance of a class that it creates (eg, "this List is used to pass strings between these two methods").

  • Problem in CR XI returning Views with PUBLIC synonyms

    I am having problem in CR XI returning Views with PUBLIC synonym.
    I can see the tables and stored procedures with PUBLIC synonym but not VIEWS.
    This is a simple View that has a PUBLIC synonym to it. I have granted the user SELECT access to the underlying Views.
    I checked the boxes in Report > Options for all the combinations possible one by one but to no avail.
    I connect CR to the instance as a specific user , password. But when I go to Views (and Tables) there is nothing visible.
    I tried PRIVATE synonyms and when I go to Views (and Tables) the views are visible, but now the Fields are not visible.
    In SQL+ and Oracle SQL Developer connected as the same user , password everything looks ok.
    Any help will be appreciated.

    Hi Wayne,
    Sorry for the delay. Not sure where this post came from.... must have been transferred from another forum.
    R1 is no longer support nor are updates available. You can upgrade to CR Xi R2 for free, it's end of life now also but has all of the latest patches included.
    Install with your XI R1 keycode and then test again.
    http://downloads.businessobjects.com/akdlm/crystalreports/crxir2_sp4_full_bld_0-20008684.exe
    http://downloads.businessobjects.com/akdlm/crystalreports/CRYSTALREPORTS06_0-20008684.EXE
    Thank you
    Don

  • Access Views through Public Synonyms

    Hi Friends,
    I have query need to clear. My current application is running on a schema *(s1)* associated with workspace *(w1)*. Now i have made one more schema *(s2)* in the same workspace *(w1)* where i have to create new tables.
    The thing is i want to use few tables column of s1 on s2. What will be the best practice for this. I have made views of columns of s1 schema and now i am thinking to create public synonym in s2 schema to access those views of s1 schema. Just want to confirm any changes or updates made on forms or report made on synonym of s2 will reflect in the base table (which is table of s1). Want to clear the concept of synonym through this. I am sure it will not update the table of s1 schema because i have made synonym of that in my s2 schema and for all page creation i am using objects of s2 not objects of s1.
    Would like to hear from you experts on this. If you have some other better soln for this, do suggest me. All my intension is to not update the tables of s1, just to use the required columns of s1 schema objects and use it in s2 schema
    Regards
    Edited by: User_Apex on Jul 7, 2010 2:21 AM
    Edited by: User_Apex on Jul 7, 2010 2:28 AM

    Hi,
    A synonym just helps you to avoid using the schema name before the object name. If you want to use some columns from tables in s1 just do the following:
    1. Create the views
    2. Create a role for that privilege (for example: select_s1_role), grant select to this role over the views and assign it to s2.
    3. Create the synonym in s2 to s1 views (just to avoid put s1. before the view name).
    For the steps above is required that s1 and s2 have the proper system privileges.
    Kind regards,

  • Export of public synonym in oracle

    Hi All,
    I am trying to export the database dump in oracle 10g using expdp command.But when I am trying to import that file i found that public synonym are missing.
    Can anyone help me its very urgent.
    expdp system/oracle directory=export dumpfile=<<x.dmp>> logfile=<<y.log>> schemas=ww_admin
    TIA,
    Ravi

    Hi,
    You can write a script to spool the list of public synonyms.
    set feedback off
    set trimspool on
    set pagesize 1000
    set linesize 1000
    set heading off
    spool public_synonyms.txt
    select      'create public synonym ' || table_name || ' for ' || table_owner || '.' || table_name || ';'
    from      dba_synonyms
    where
         owner='PUBLIC' and table_owner not in ('SYS', 'SYSTEM')
    order by
         table_owner;
    spool off
    exit
    Hope it helps.
    Regards,
    Z.K.

Maybe you are looking for

  • [SOLVED] Dual boot with Windows 8, problems after updating Windows

    Hi all, I have been maintaining a dual boot of arch and Windows 8 for some time. I recently updated Windows to 8.1, and found that the update process had two side effects: 1) The update added a new partition in the middle of my file table, so my /etc

  • Mighty Mouse Forced Recognition?

    hi folks. i have a problem with my set up. i am using a DVI KVM switch to control two macs and a pc. because of the KVM switch, neither mac recognizes the Mighty Mouse that i have connected. Also, the scrolling axes of the roller ball are switched. I

  • GR Processing Time and Delivery Time not coming in CS11 Output screen

    Hi, I am executing a BOM explosion report using CS11. In the CS11 report output I added columns for GR Time and Delivery Time using change layout option. After changing layout when I see the details in columns of GR Time and Delivery Time all the val

  • Is this a bug? create view lost a comma and succeeded

    Is this a bug? create view lost a comma and succeeded. oracle 10.2.0.1.0 try the following sql. create table test id int, dataa varchar2(20), datab varchar2(20) insert into test values(1,'a1','a2'); insert into test values(2,'b1','b2'); insert into t

  • New owner for emac

    I have given my old emac to my mother to help her get started w/ her first computer. I want to be able to update the software, but it won't accept my id or log in and password, and it won't accept hers, even tho I thought we had changed it properly.