Read every character in a string

Hi,
I want to read every charater in a string and if I find a special character(¿) then want to replace with replace it with(°) symbol. length of the characters are not fixed.
Please advise.
Regards,
Arnie.

user558927 wrote:
Hi,
I want to read every charater in a string and if I find a special character(¿) then want to replace with replace it with(°) symbol. length of the characters are not fixed.
Please advise.
Regards,
Arnie.There's built in functionality for that.
http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions153.htm#SQLRF00697
Cheers,

Similar Messages

  • Hi, Occurrences Of Every Character In A String

    Hi All,
    I want to write a program wherein I can check the occurrences of every character in the string given.
    What should I do, is there a in built function to do this.
    Please help

    I wrote this program and this works fine... Thanks
    public class Main_Character_Occurence
        public static void main(String args[])
            String inputString = " Test String";
            String matches = "abcdefghijklmnopqrstuvwxyz";
            int sum = 0;
            for (int i = 0; i < matches.length(); i++)
                for (int ctr = 0; ctr < inputString.length(); ctr++)
                    if (matches.charAt(i) == Character.toLowerCase(inputString
                        .charAt(ctr)))
                        sum++;
                System.out.println(matches.charAt(i) + "=" + sum);
                sum = 0;
    }The output I am getting is this
    a=0
    b=0
    c=0
    d=0
    e=1
    f=0
    g=1
    h=0
    i=1
    j=0
    k=0
    l=0
    m=0
    n=1
    o=0
    p=0
    q=0
    r=1
    s=2
    t=3
    u=0
    v=0
    w=0
    x=0
    y=0
    z=0

  • How to read each and every word from a string.

    Hi all,
       I have a string which is having many label numbers. if the string is lv_str, its value is like, 11111111111111##22222222222222##3333333333333.
    I need to move the values alone into internal table. each value should be updated as a single row into one internal table. How to read each and every word of the string and move to an internal table.
    the internal table should be like this.
    11111111111111
    22222222222222
    3333333333333
    Can any one give me a suggestion in this regard.
    POINTS PROMISED.
    Regards,
    Buvana

    Hi,
    If you know the format and length of the data
    Use split at '#' so that you will get the individual values.
    Thean append it to internal table.
    Reward iof helpful.

  • Replacing first Character of every word in a string with an Uppercase

    Hi,
    Is it possible to replace all first character of every word in a string with UpperCase?
    $="autocad lite"
    Should look "Autocad Lite" .
    Thanks,
    François

    Hi FRacine,
    Please refer to the script below:
    $givenname="autocad lite"
    $givenname
    $givenname = $givenname.substring(0,1).toupper()+$givenname.substring(1)
    $givenname
    Edit: to change first character in every word, please refer to this script, this may not be the best way, but it can work:
    $givenname="autocad lite"
    $givenname
    $words=$givenname.split(" ")
    $givenname=""
    foreach ($word in $words){
    $givenname+=$word.substring(0,1).toupper()+$word.substring(1)+" "}
    $givenname=$givenname.trim()
    $givenname
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • How do I read a character and advance the scanner to the next one?

    Hi,
    I'm writing a lexical and grammar analyzer and I don't usually program in Java. I have a method that reads one character and then parses it. The problem is that it keeps reading the same character over and over again, so my program gets stuck in an infinite loop.
    How do I make it so that BufferedReader advances to the next character in the string?
    Here is the code so far:
    public static void getChar()
                throws FileNotFoundException, UnsupportedEncodingException, IOException {
            BufferedReader reader = new BufferedReader(new InputStreamReader
                    (new FileInputStream(inputFileName), Charset.forName("UTF-8")));
            int c;
            if ((c = reader.read()) != -1){
                if (c != 32)
                    nextChar = (char) c;
                if (Character.isLetter(nextChar))
                    charClass = LETTER;
                else if (Character.isDigit(nextChar))
                    charClass = DIGIT;
                else
                    charClass = UNKNOWN;
            else{
                charClass = EOF;
                //System.out.println("Next Token is: RES_WORD. Next lexeme is: EOF.");
        } //end getChar.At first I just had a while loop, but I want this method to be called from another method and so I didn't think the while loop worked. Is there a better way?
    Help is much appreciated.
    EDIT: By the way, I don't want to read tokens. I need it to be characters. And it doesn't have to be BufferedReader. I'm open to suggestions.
    EDIT2: While I don't want to read tokens, if it's the simplest way then I'm open to it. The scanner class would work for that I guess, but then I would have to do a charAt stuff. I'm open to your insight.
    Edited by: RommelR on Feb 25, 2010 8:39 AM
    Edited by: RommelR on Feb 25, 2010 9:00 AM

    DrClap wrote:
    Every time you call that method, you open a new BufferedReader on the file and read the first character from it. So yes, you always get the same character. Solution: Don't open the BufferedReader in that method. Open it somewhere else, just once, and use it in that method.Thanks. That was stupid of me.

  • BufferedReader Problem (inserting space after every character)

    (This is a message I sent to an Aglet forum, however I thought maybe someone here could help me with the BufferedReader problem...with the spacing...read below)
    -Blake
    ok here's what I'm attempting to do.
    I have a Master Aglet that creates a slave which is dispatched to a remote site. The Slave then opens a log file, reads it, and then is supposed to read the file line by line and send each line as a message back to the Master. As the master receives each line it appends the line to the window it created earlier.
    I don't know what the problem is...it won't display the log file in the master window.
    It does display each line on the console window.I added a println() function to make sure the String array was getting the information. There is a small problem with that as well because it inserts a space after EVERY character (BufferedReader problem??)...what is up with that? for example:
    If the log file looked like: This is a log file entry.
    the console looks like this when it is printed: T h i s i s a l o g f i l e e n t r y .
    .... I had done something in a similiar program...and it worked just fine. here's some source code:
    <b>Master:</b>
    else if (msg.sameKind("Log")) {
    try {
    //println for testing purposes
    System.out.println(msg.getArg());
    appendMessage(" " + msg.getArg() + "test \n");
    } catch (Exception e) {
    System.out.println(e.toString());
    <b>Slave: </b>
    File log = new File("C:\\Aglets2.0.2\\public\\WINDOWSUPDATE.log");
    FileReader fr = null;
    try{
    fr = new FileReader(log);
    } catch (FileNotFoundException e) {
    System.out.println(e);
    BufferedReader br = new BufferedReader(fr);
    //Get filename of log
    try {
    Message msg = new Message("FileName", log.getName());
    mProxy.sendOnewayMessage(msg);
    } catch (InvalidAgletException iae) {
    System.out.println(iae.toString());
    } catch (Exception e) {
    System.out.println(e.toString());
    //read each line of file and send back to Master as a message
    try{
    int i = 0;
    while ((s = br.readLine()) != null) {
    i++;
    count = i;
    for (int j = 0; j < count; j++)
    System.out.println(s[j]);
    //send message back to Master Aglet with log file information
    try {
    Message msg = new Message("Log", s[j]);
    mProxy.sendMessage(msg);
    } catch (InvalidAgletException iae) {
    System.out.println(iae.toString());
    } catch (Exception e) {
    System.out.println(e.toString());
    //close file reader
    fr.close();
    } catch (IOException e) {
    System.out.println(e.toString());
    }

    actually i did declare s, you just don't see it there because i only posted some of the code....
    I fixed the "spacey" problem by using a FileInputStream instead of a bufferedreader....
    like this (i'll post the whole code here:
    public class Slave extends BlindAglet {
        AgletProxy mProxy = null;
        boolean back = false;
            char[] c = new char[1000];
        BufferedReader br = null;
        int count;
        // Do some tasks when the aglet is created
        public void onCreation(Object init) {
            // Must make a note of the master here
            mProxy = (AgletProxy)init;       
            // Add our own listener and adapter
            addMobilityListener(
                new MobilityAdapter() {
                    // Using this as a safety check in case we get caught in a loop in the same host
                    public void onArrival(MobilityEvent event) {                   
                        try {
                            mProxy.sendMessage(new Message("NewSlaveProxy", getAgletContext().getAgletProxy(getAgletID())));                                                            
                        } catch (InvalidAgletException iae) {
                            System.out.println(iae);
                        } catch (NotHandledException ex) {
                            System.out.println(ex);
                        } catch (MessageException ex) {
                            System.out.println(ex);
                        //Are we back to origin?
                            if(back) {         
                                 back = false;     
                                try{
                                     FileWriter fw = new FileWriter("test.txt");                                                                  
                                 for (int i = 0; i < count; i += 2){ 
                                           fw.write(c);
                             fw.close();
                        } catch (IOException e) {
                                  System.out.println(e);
                                  dispose();
                             dispose();
    ); /* End of Adapter */
    public void run() {
         // Are we at home base?
    if (atHome()) {
    try {
    dispatch(new URL("atp://darklord:4434"));
    } catch (Exception e) {
    System.out.println(e.toString());
         try{
         File log = new File("C:\\Aglets2.0.2\\public\\WINDOWSUPDATE.log");
         FileInputStream f0 = new FileInputStream(log);
    //Get filename of log
    try {
         System.out.println(log.getName());
    Message msg = new Message("FileName", log.getName());
    mProxy.sendOnewayMessage(msg);
    } catch (InvalidAgletException iae) {
    System.out.println(iae.toString());
    } catch (Exception e) {
    System.out.println(e.toString());
              //read each line of file and send back to Master as a message
              try{               
         int size = f0.available();
         int i = 0;
         for (i = 0; i < size; i++) {
              c[i] = (char) f0.read();
    //send message back to Master Aglet with log file information
                             try {
                        Message msg = new Message("Log", c[i]);
                        mProxy.sendOnewayMessage(msg);
              } catch (InvalidAgletException iae) {
                             System.out.println(iae.toString());
                        } catch (Exception e) {
                             System.out.println(e.toString());
    count = i;
              } catch (IOException e) {
                   System.out.println(e.toString());
                   } catch (FileNotFoundException e) {
                   System.out.println(e);
         back = true;      
         returnHome();
    * Returns true if the current host is our origin
    public boolean atHome() {
    if (getAgletInfo().getOrigin().equals(getAgletContext().getHostingURL().toString()))
    return true;
    else
    return false;
    * Allows a slave to contact it's master and ask for a retraction.
    public void returnHome() {
    try {
    Message msg = new Message("RetractMe");
    msg.setArg("url", getAgletContext().getHostingURL());
    msg.setArg("id", getAgletID());
    mProxy.sendOnewayMessage(msg);
    } catch (InvalidAgletException iae) {
    System.out.println(iae.toString());
    } catch (Exception e) {
    System.out.println(e.toString());
    * Return a reference to our Master's proxy
    public AgletProxy getMasterProxy() {
    return mProxy;
    } /* End of Class

  • Incrementing every letter in a string that occupies an odd position.

    Hi, for an "encryption" project, i need your help creating a method that will be incrementing by 5 every char in a string that occupies an odd position in that same string.
    For example : 'adam' should return 'aiar'
    -Method can't use arrays.
    -Method can't use regular expressions like 'split' etc..in order words the teacher wants us to use the simplest stuff inside the String class.
    -Only letters must be modified.
    so far i have this : (names of values are in french, sorry)
    public class Main {
    public static String incrementerDeCinqImpaires (String chaine) {
    char j = chaine.charAt(1);
    char x = chaine.charAt(3);
    char o = chaine.charAt(5);
    j+=5;
    x+=5;
    o+=5;
    System.out.println(x);
    System.out.println(j);
    System.out.println(o);
    String   tmpString = chaine.replace( chaine.charAt(1), j );
    String   tmpString2 = tmpString.replace( tmpString.charAt(3), x );
    String   tmpString3 = tmpString2.replace( tmpString2.charAt(5), o );
    System.out.println( "Original = " + chaine );
    System.out.println( "Result   = " + tmpString3 );
    return tmpString3;
    public static void main (String args [] ) {
           System.out.println (incrementerDeCinqImpaires("adam"));
    }The thing is i need a "for" loop (which has been a nightmare for me trying to figure out how to make it) in order to increment every odd positioned char in the string.
    So all I need really is to sum up what i posted above inside a for loop (or more). Then just add ifs and elses so i can increment only letters.

    I don't think String.replace will do what you want. What happens when a single letter appears in an even-numbered position and then in a later odd-numbered position?
    Can you use StringBuilder?
    Or you can do a bunch of String appends (i.e., use StringBuilder implicitly), one character at a time, in a loop.
    By the way you haven't done the part where you check that the character is a letter.
    Also, what do you do with the last five letters of the alphabet? (Regardless of the alphabet you're using.) You could end up inserting control characters or characters that you can't print in your locale. Do you wrap?

  • [AS] Set every character leading to auto

    I can't seem to get this to do what I expect.
    tell application "Adobe InDesign CS5.5"
    tell every text frame of page 1 of active document
      set leading of properties of every character of every paragraph to auto
    end tell
    end tell
    The script I am working on imports text. Everything works except the leading, it comes in with "0 pt" leading and I need the script to basically check every character on the page and if the leading is 0 set it to auto.... I put this together as a quick and dirty test to try and make it work and in no way represents the final code.
    Everything I have tried has either done nothing or gives me an error saying "Expected number, string or auto" when I give it auto.
    I don't care if it is AS or JS as long as it works.

    The problem is that some text comes in with the leading set properly and some doesn't. Only when the leading is set to 0 should it adjust it to auto.
    I also need the 'do script' because this is a single line in a very large script written almost entirely in Applescript.
    The project I am working on takes documents made in MultiAd Creator and migrates them to Indesign. We are phasing out the other product and using only Adobe. The entire archive of old documents needs to be migrated over to indesign.
    The script currently will get about 80% of that correct. The leading was one of the minor issues. There is something like 4000 documents to be migrated over and the script needs to pretty much do it without interaction and get the new document to be 100% exact to the old document.
    It works like this:
    The script navigates the entire server finding Creator documents.
    Opens each in turn in Creator.
    Creates a new InDesign document of the same dimensions.
    Every color in the Creator document is add to the swatches in InDesign.
    Then every shape object is recreated point by point in the InDesign document. (this includes the placed graphics)
    All text flows in the Creator document are recreatedas text frames in the InDesign document.
    Everything is adjust so that layering is correct.
    The new Indesign document is then saved in the same location as the Creator document using the same name.
    Creator handles fonts differently than Indesign. Instead of using italics or bold from the font family it would apply stroke or skew the text. I have that nearly sorted out so that it works nearly perfectly, but the leading was not coming over properly 100% of the time.
    What I thought should work wasn't and that was bugging me as one of those "I'll come back to it later" things I hadn't come back to yet.

  • Question on reading one character at a time.

    Hi. I am assigned a program where I have to read a series of bits (for example: 01010101). Using this I have to make a "graph out of it". The way I am supposed to make a graph is as follows:
    Each bit interval will be represented in the output as a field taht is two characters wide.
    The value of the signal is represented using either + (to represent +voltage) or - (to represent - voltage) and is always the second character in the output field.
    The first character in the output field is either:
    ' . ' = to indicate no change from the previous signal value or
    ' / ' = to indicate a negative to positive transition or else
    ' \ ' = to indicate a positive to negative transition
    Example for input: 01010101 and the output would be . + \ - . - / + \ - . - / + . + \ - / +
    The code that I got so far is that I read the input from the command line as a argument which I know is nothing but I would just like to know how to read the character one by one and make a graph which is totally boggling my mind because I have no idea how I can do it. Thank you for your help.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Encoder
         public static void main(String[] args)
              int b = Integer.parseInt(args[0].trim());
              System.out.println("You spit out --> "+b);

    Alright I sorta got what you were sayin'. The code that I have now is:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Encoder
         public static void main(String[] args)
              String toEncode = String.valueOf(args[0]);
              StringBuffer result = new StringBuffer();
              char lastChar = toEncode.charAt(0);
              char curChar = '0';
              char lastSign = '+';
              int length = toEncode.length();
              for (int i = 0; i < length; i++)
              curChar = toEncode.charAt(i);
              if (curChar != lastChar)
              if (curChar == '0')
              result.append("\\-");
              lastSign = '-';
              else
              result.append("/+");
              lastSign = '+';
              lastChar = curChar;
              else
              result.append(".");
              result.append(lastSign);
              System.out.println("You spit out --> "+result);
    But it doens't work according to what I want it to do. What I need it to do is the following: Lets say we have the input of 01010101, the result we will get is ". + \ - . - / + \ - . - / + . + \ - / +". The reason for this is because of the following: The graph starts on the v all the time. When there is a 0 bit there is no change and when there is a 1 bit there is an inversion of the voltage level so since we started with a 0 bit at v, when we hit 1 bit we would make a inversion to -v and when we hit 0 bit there would be no change. I don't know of what I said is clear to you or not. For this program, what it does for the input of 01010101, the output is
    " . + / + \ - / + \ - / + \ - / + ". Thank you very much.

  • Read a character 1 at a time from a text file

    Hi all,
    I have tried the following to read 1 character at a time from a text file but it did not work;
    int buf_sz = 1;
             try
                BufferedReader br = new BufferedReader( new FileReader( "C:\\bitshift.txt", buf_sz ));
                String rd_line = null;
                while( (rd_line = br.readLine()) != null)
                    System.out.println(rd_line + "\n");
             }I could only get it to read the whole line by removing the buf_sz when creating an instance of the BufferedReader.
    How can I achieve this?
    Thanks

    The Javadoc for Reader.read()
    read
    public int read()
             throws IOException
        Read a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached.
        Subclasses that intend to support efficient single-character input should override this method.
        Returns:
            The character read, as an integer in the range 0 to 65535 (0x00-0xffff), or -1 if the end of the stream has been reached
        Throws:
            IOException - If an I/O error occurs

  • Problem --serial port reading one character at a time

    Hi Friend,
    I reading the serial port  one character at a time ,  i specified it in the "serial bytes to read" option in serial port read examples.
    The problem is ----------i can able to read  the data.
    but only the first character is reading again and again...and "reading string indicator" in the serial port example shows only the first character sent ..only for a single time.since i am reading continously ----aleast the first character should display as many times i running the program
    (i am running the vi by run continous option..........)..
    please help me ....how to read the character one by one.....
    regards
    rajasekar

    Hi jason...
    I can able to read the serial port by 1 byte or 2 byte or 4 byte as i can specify it in the serial port read bytes option..(in visa serial read)..
    I need to acquire 4 bytes of data and pass it to the Math-script node..and save these 4bytes of data in array (1 row and 4 column)..
    And split this array(just like array-indexing.vi) and processing it each each column separately....
    or suggest some method to achieve my task.....please.
    one more thing the math-script node is placed in a while loop.....in order to read sequence of bytes continously.......
    regards
    rajasekar

  • How to read every line from a text file???

    How can i read every line from my text file ("eka.txt")
    now it only reads the first line and prints it out.
    What is wrong with this?
    import java.io.*;
    import java.util.*;
    class Testi{
         public static void main(String []args)throws IOException {
         BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));
    File inputFile = new File ("eka.txt");
    FileReader fis =new FileReader(inputFile);
    BufferedReader bis = new BufferedReader(fis);
    String test=bis.readLine();
    String tmp= "";
    while((bis.readLine().trim() != null)) {
    int spacefound=0;
    int l=test.indexOf(" ");
         for(int i=0;i<test.length();i++){
         char c=test.charAt(i);
         if(c!=' ') tmp+=""+c;
         if(c==' ' && (spacefound<1) && !(tmp.equals(""))){
         tmp+=""+c;
         spacefound++;
         if(tmp.length()==l) {
         System.out.println(tmp);
         tmp="";
         spacefound=0;
         if(tmp.length()<l){
         for(int i=0;i<=(l-tmp.length());i++)
         tmp+=""+' ';
         System.out.println(tmp);

    Try this code, Hope it servers your purpose.
    import java.io.*;
    import java.util.*;
    class Testi {
         public static void main(String []args)throws IOException {
              BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));
              File inputFile = new File ("Eka.txt");
              FileReader fis =new FileReader(inputFile);
              BufferedReader bis = new BufferedReader(fis);
              String test=bis.readLine();
              while(test != null) {
                   StringTokenizer st = new StringTokenizer(test," ");
                   while(st.hasMoreTokens())
                        System.out.println(st.nextToken());
                   test = bis.readLine();
    }Sudha

  • Replacing a character in a string to another character

    hi,
    i need to write a function or procedure to replace the character of a string value suppose:
    l_error:= 'abcdefghijklmnop' is a string
    i need write a function or procedure to replace the character "c" to "z"
    that data in l_error is not in any table.
    thanks,
    AJ

    I want to Replace all the Existence of the word - "Test" in a string with "Test1" whereever a space exits before the word Test and someother alphabet after "Test" i.e. Test will be replaced with Test1 if a word starts with Test and contains more alphabets also. For example - TestName should be replaced with Test1Name while MyTest should not be updated to MyTest1.
    I have tried to use below query which uses oracle regular expressions -
    SELECT REGEXP_REPLACE('MYCOMPANY TEST TESTGEET INDIA PVT LTD TEST','\s(TEST)\w',' TEST1') FROM DUAL
    Output -
    "MYCOMPANY TEST *TEST1EET* INDIA PVT LTD TEST"
    Here, it has also replaced the G also from TESTGEET and resulted in TEST1EET while i want TEST1GEET.
    Can someone please suggest how can i do this..... may b m doing some silly mistake but sorry m a newbie to regular expression...
    Thanks in advance..

  • Read every 5th (or so) line from a text file.

    How to create software in LabView 6.1 that can do the following:
    1. Read a text file. The date (time stamp, and four numbers – separated by “,”) are stored in lines.
    2. Read every 5th (or so) line. How to read EOF caracter?
    3. Write data (lines) in a new file.

    Quick answer : if your file is not too large, load it in memory as a 1D array of strings, then use the "Decimate array" function, convert back the string array into a spreadsheet string and save.
    See the attached jpeg
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Decimate Text file.jpg ‏17 KB

  • How to replace a character in a string with blank space.

    Hi,
    How to replace a character in a string with blank space.
    Note:
    I have to change string  CL_DS_1===========CM01 to CL_DS_1               CM01.
    i.e) I have to replace '=' with ' '.
    I have already tried with <b>REPLACE ALL OCCURRENCES OF '=' IN temp_fill_string WITH ' '</b>
    Its not working.

    Hi,
    Try with this..
    call method textedit- >replace_all
      exporting
        case_sensitive_mode = case_sensitive_mode
        replace_string = replace_string
        search_string = search_string
        whole_word_mode = whole_word_mode
      changing
        counter = counter
      exceptions
        error_cntl_call_method = 1
        invalid_parameter = 2.
    <b>Parameters</b>      <b> Description</b>    <b> Possible values</b>
    case_sensitive_mode    Upper-/lowercase       false Do not observe (default value)
                                                                       true  Observe
    replace_string                Text to replace the 
                                         occurrences of
                                         SEARCH_STRING
    search_string                 Text to be replaced
    whole_word_mode          Only replace whole words   false Find whole words and                                                                               
    parts of words (default                                                                               
    value)
                                                                               true  Only find whole words
    counter                         Return value specifying how
                                        many times the search string
                                        was replaced
    Regards,
      Jayaram...

Maybe you are looking for

  • Unable to load font"^0" "Helvetica Neue" After Effects CC

    After updating After Effects CC, the warning appears: Unable to load font"^0" "Helvetica Neue" HelveticaNeue.dfont is available in my HD/System/Library/Fonts I work with: Before the CC update everything worked fine. Please help me.

  • Picasa Web albums: doesn't display all uploaded photos. This only happens on my desktop computer. All photos displayed on my laptop.

    Not all of my uploaded photos display in my Picasa web album. All the photos upload, but 17 out of 90 photos don't display. Some are landscape, some are portrait. This is no pattern to what doesn't display (e.g., not every third photo). This only hap

  • Z-index-- image fixed/ text mobile

    I'm a web developer student with 5 classes left before graduation (with honors) and I've come to realize...I'm really not ready for the workforce! GRRRR I have a layer question. My page setup is as follows; z-index 1 or 'OuterPanel' is position absol

  • ALV Hierarchy

    Hi Experts, I have Hierarchy report, but i took 2 tables header and item tables, but in my output item table is dispalying but heading is not displaying, is there any setting problem and header table heading is gone right side, not displaying properl

  • JPA and Database Views

    hi , How can i represent my DataBase View in JPA , and since each "Entity" should have an "@Id" how can i handle this on my views since some of them does not have a convenient ID field/fields , Thanks