Persistence-A-team Mobile Accelerator

Hello

I want to know y at - it opportunities in the persistence infrastructure A-team in order to limit the creation of no. of java classes.

for an example to consider.

{

"user":

{

"username":

},

"link":

{

'weblink ';

},

'Image ':

{

"Profile-image":

},

"details":

{

'name':' ',

'name ':

}

}

Now this framework really create four class for me, but I want to create only one class User.java that contains the field just as username, Internet link, profile picture, name, name etc. is it possible to combine all the field into a single class and create a table in the database file

and this class of user to map to the database table, using the framework of persistence A-team?

Yes, to get what you want, it takes a little 'fool' AMPA. By default, you do not get a surrounding class because your payload starts with an anonymous JSON object.

What you can do is the following:

-Use the option to specify a charge of the sample and surround your payload with hooks so that it becomes a JSON array:

[{

"user":

{

"username":

},

"link":

{

'weblink ';

},

'Image ':

{

"Profile-image":

},

"details":

{

'name':' ',

'name ':

}

}]

-Check the box "flatten nested objects.

-go to the next page of the wizard, and you will see a suggested class you want to rename to something like 'user '.

The AMPA enforcement code will be able to treat your GET request correctly, regardless of whether or not your payload is sent in the form of a JSON array.

Steven Davelaar,

Oracle Mobile A-team.

Tags: Oracle Mobile

Similar Questions

  • JDEVELOPER 12.1.3 - MAF 2.1 - JDK 1.8 - declarative REST-JSON consumer services and persistence with Oracle A-team Mobile Accelerator for Oracle MAF persistence

    I was trying to find the below tutorial accelerator MAF:

    http://docs.Oracle.com/CD/E53569_01/tutorials/tut_jdev_maf_persistance/tut_jdev_maf_persistance.html

    For part 2 of this tutorial, after that a successful project viewcontroller HFrepos application deployment below url (with ip address) does not show expected results:

    http:// < YOUR_IP >: 7101/HRRest/Persistence/v1.0/Model-1/Query/Department.FindAll

    This blocks any further development for the hand accelerator on.

    Kindly advice on any changes in addition to the measures mentioned in the tutorial.

    Kind regards

    Dushyant Lad

    Dushyant,

    The typical reasons for this error are:

    -The name of your persistence unit is not 'Model 1', but something else, like "model 1". You then need to change the URL accordingly (and it is case sensitive)

    -You has not successfully added topink-dataservoices-web-.jar to your project, as explained in step 3.2 in part II

    If you still can't find the mistake you have done by following the steps, and you want to continue with part 3 (which is what the tutorial is all about), then you can download the completed the HFREPOS zip file. (Same link can be found in the tutorial)

    Steven Davelaar,

    Oracle Mobile A-team.

  • A-team Mobile Accelerator persistence: persistence specific user?

    Hey,.

    is it possible to store user-specific responses of RESTING in the sqlite DB and also reading for the current user?

    The idea is that another user can log on to the same device and receives different data from webservice - but the old user data could contain changes offline and cannot be deleted.

    A column for the specific user in each table would solve that problem, but it is possible to map a variable session scope of te to a column in the persistence - mapping.xml to hold the data of the user next to eachother and filter for the current user?

    Thanks for the help!

    Marcus

    Marcus,

    Best way to do this is to override the executeLocalFindAll method in your class of service to restrict the query based on the current user. Something like this:

    @Override

    List protection executeLocalFindAll()

    {

    DBPersistenceManager h = getLocalPersistenceManager();

    ArrayList searchAttrs = new ArrayList ();

    searchAttrs.add ("UserName");

    String userName = (String) AdfmfJavaUtilities.evaluateELExpression("#{securityContext.userName}");

    Return pm.find (Department.class, username, searchAttrs);

    }

    To get the current username stored with each row in each table, is a little more complicated, you can not specify such a value in persistence - mapping.xml.

    What you could do is:

    -Add the user name attribute to each data object

    -Add the USER_NAME column for each table

    -Add the mapping of attr user name for each class descriptor in the persistence-mapping

    -In the constructor by default each Java class data object, set the user name in assessing #{securityContext.userName}

    After a service call is made, the created entities will all have the username and these features are used to create lines in the comic book.

    When loading of the lines of the DB, this value by default user name will be substituted bby the value stored in the DB (but if alweays filter on the current user is not serious)

    Or, another approach is to create a subclass of the DBPersistenceManager and override the insertEntity method to add the user name attribute or, if you want to add the column, not the attribute to each entity, override the method insertRow.

    Note that in waiting for the actions of synchronization data by a previous user will be synchronized first when the current user is back online.

    Steven Davelaar,

    Oracle Mobile A-team.

  • Problem with Accelerator Mobile persistence A-team

    Hi all

    I try to use persistence for the A-team Mobile accelerator. But when the generation through scrip of Ant, he demonstrated error and Build is failure.

    Can someone help me on this.


    [javac] Compiling 95 source files to F:\JDeveloper\mywork\mobile-persistence-master\mobile-persistence-master\Projects\Framework\Runtime\classes
        [javac] javac: invalid target release: 1.8
        [javac] Usage: javac <options> <source files>
        [javac] use -help for a list of possible options
    

    Kind regards

    KP

    Hello

    Mobile persistence Accelerator A-team uses MAF 2.1 and Java 8. Looks like you have not (completely) install Java 8 and MAF 2.1 yet. You can check your installation?

    Steven Davelaar.

    Oracle Mobile A-team.

  • A-team Mobile persistence Accelerator - Insertion into the child records for a Parent-child data objects

    Hello team

    We use persistence Mobile Accelerator for our application of MAF. We must build couple of REST services for it (Fetch, Create, Update), problem is we are able to insert/update of the parent records but we are not able to create child records.

    It seems when we ask the operation of creation in the book of the child, is no new line for child is created.

    Here is the screenshot of the data control wizard:

    parent.pngchild.png

    Here is the task (update) and desktop (create) JSON format (TaskAssignment is the address of the child)

    PUT the task:

    {

    'Task': {}

    'ACTIVITY_ID': 100,.

    'PROJECTID': 100,.

    'ACTIVITY_NAME': "string",.

    'DESCRIPTION': 'string ',.

    'PARENT_ACTIVITY_ID': 100,.

    'STATUS': "string",.

    'PRIORITY': "string",.

    'PERCENTAGE_COMPLETE': 100,.

    "START_DATE": "2008-09 - 28 T 21: 49:45.

    "END_DATE": "2014-09 - 18 T 19: 18:33.

    'ETA': ' 2006-08 - 19 T 13: 27:14 - 04:00 ",".

    'ESTIMATED_HOURS': 100,.

    'ACTUAL_HOURS': 100,.

    'OWNER_USER_ID': 100,.

    'CREATED_BY': "string",.

    "CREATION_DATE': ' 2009-05 - 16 T 08: 42:28"

    'LAST_UPDATED_BY': 100,.

    'LAST_UPDATE_DATE': ' 2003-08 - 08T 20: 18:37 - 04:00 ",".

    "TaskAssignment": [{}

    'ASSIGNMENT_ID': 1000.00.

    'PROJECT_TEAM_MEMBER_ID': 1000.00.

    "START_DATE": "2012-09 - 13 T 09: 00:34 - 04:00", ".

    "END_DATE": "2009-10 - 14 T 03: 16:36."

    'CREATED_BY': "string",.

    'CREATION_DATE': ' 2010-03 - 18 T 12: 05:32.

    'LAST_UPDATED_BY': "string",.

    "LAST_UPDATE_DATE": "2018-12 - 28 T 14: 51:14 - 05:00", ".

    'FAVORITE_FLAG': "string".

    } ]

    }

    }

    Workstation:

    {

    "Task": [{}

    "ACTIVITY_ID": 1000.00.

    'PROJECTID': 1000.00.

    'ACTIVITY_NAME': "string",.

    'DESCRIPTION': 'string ',.

    'PARENT_ACTIVITY_ID': 1000.00.

    'STATUS': "string",.

    'PRIORITY': "string",.

    'PERCENTAGE_COMPLETE': 1000.00.

    "START_DATE": "2008-09 - 28 T 21: 49:45.

    "END_DATE": "2014-09 - 18 T 19: 18:33.

    'ETA': ' 2006-08 - 19 T 13: 27:14 - 04:00 ",".

    'ESTIMATED_HOURS': 1000.00.

    'ACTUAL_HOURS': 1000.00.

    'OWNER_USER_ID': 1000.00.

    'CREATED_BY': "string",.

    "CREATION_DATE': ' 2009-05 - 16 T 08: 42:28"

    'LAST_UPDATED_BY': "string",.

    'LAST_UPDATE_DATE': ' 2003-08 - 08T 20: 18:37 - 04:00 ",".

    "TaskAssignment": [{}

    'ASSIGNMENT_ID': 1000.00.

    'PROJECT_TEAM_MEMBER_ID': 1000.00.

    "START_DATE": "2012-09 - 13 T 09: 00:34 - 04:00", ".

    "END_DATE": "2009-10 - 14 T 03: 16:36."

    'CREATED_BY': "string",.

    'CREATION_DATE': ' 2010-03 - 18 T 12: 05:32.

    'LAST_UPDATED_BY': "string",.

    "LAST_UPDATE_DATE": "2018-12 - 28 T 14: 51:14 - 05:00", ".

    'FAVORITE_FLAG': "string".

    } ]

    } ]

    }

    Please let me know if I missed all the details.

    Waiting for answer!

    Thank you

    Diprish

    Massari,

    Task.Java seems good. The question is: how to create the new instance of task assignment in the UI?

    That's what you do: you must use the create operation standard of the palette of the title of the collection of nested task assignment data control. Thus, enrich the collection of task, the collection taskAssignment nested in the task, expand the node of the operations and drag and drop the operation of creation on your page. This should add the new instance to the collection of the current task task assignment. To make sure that this is the case, set a breakpoint in the addTaskAssignment method in Task.java. Then, when you save the parent task, load useful json must include a table nested with the new task assignment.

    Steven Davelaar,

    Oracle Mobile A-team.

  • Advice for current mobile

    Hi all

    I've developed a web application using oracle adf, I need to run some screens in mobile (Android, ios) each of these screens display the data from a table(PK_ID,NAME,STATUS) with a single button

    When I press the button for the currently selected line will set STATUS = 1.


    My question is what choice do (MAF or oracle adf mobile browser) to run or developed my screens for mobile?





    Kind regards

    Yes, with MAF, you can work offline and synchronize later. The A-team Mobile Accelerator persistence will be a great help you wan to build these apps of the MAF.

    In an application of MAF, you can have a few pages running locally on your device, and you can have some "Remote" pages that link for example toan ADF Faces page running on your server. See this chapter ion guide dev for more information: http://docs.oracle.com/middleware/maf210/mobile/develop-maf/maf-ui-remote-url.htm#ADFMF756

    Steven.

  • Oracle MAF: Changing data in non-reflecting DB in WebService.

    Hello

    I use Oracle of the CRG as well as AMPA (A-team Mobile Accelerator persistence) to develop a mobile application.

    MAF Version: 2.1.2.0.41

    AMPA Version: 12.1.3.2.32

    WebLogic Version: 12.x

    Oracle Toplink Version: oracle.toplink_12.1.3

    I encountered this problem often, I made changes to data manually to the backend (Oracle DB) and try to get the data modified by Web service URL in the browser. But data changes to does not appear until I restarted the WebLogic Server (where I deployed the Application WebService) and redeploy the application.

    Is it possible to reflect the changes without restarting the WebLogic Server? Because it will be needed when this application become a request for support.  Please suggest.

    PS: Please comment below, if you need clarification in this regard.

    Kind regards

    Indana Blackburn

    Hi Steven Davelaar,

    Thanks, I'll look at the link that you shared.

    ___________________________________________________________

    Update:

    Yes, it seems problem with TopLink which I've used (oracle.toplink_12.1.3).

    ___________________________________________________________

    Update:

    As Steven suggested, we need to disable the cache in TopLink, here is the code example to set this configuration in persistence.xml (note the number of the line 12 and 18).

    
    
      
        org.eclipse.persistence.jpa.PersistenceProvider
        java:/app/jdbc/jdbc/DBDS
        model.TableName
        
          
          
          
        
      
      
        org.eclipse.persistence.jpa.PersistenceProvider
        model.TableName
        NONE
        
          
          
          
          
          
        
      
    
    

    Now, Webservice will give you latest data always it will render all cached data.

    Thank you

    Indana Blackburn

  • Could not find 'MAF Business objects of REST Web Service' in the Gallery

    Hello

    I installed Jdev studio 12.1.3.0.0 and installed updates for the extension of the MAF. It shows screen-Extensions on Jdev Mobile Application Framework.

    I have windows 32-bit and using the version compatible jdev.

    But there is no option for the creation of 'MAF Business objects of REST Web Service' in the gallery.

    Can someone please help.

    I am also attaching screenshot.

    Thank you

    Abbas Qureshi

    Abbas,

    This wizard is part of the A-team Mobile Accelerator persistence (AMPA), which is a separate JDeveloper extension that works on top of the MAF.

    See this article start for more information.

    Steven Davelaar,

    Oracle Mobile & Cloud A-team.

  • MAF Freeze on the start screen (Jdev MAF 2.1.0 jdk1.8.0_31 and persistence of Mobile A-team)

    Hi Experts,

    I've just updated to the MAF 2.1.0 with jdk1.8.0_31

    Previously, MAF Application with persistence of A-team Mobile works very well. However, after this update, it still stuck on the startup screen.

    If I change the MAF - application.xml to point to lifecycle.java default MAF, it works fine, even faster.

    I tried to debug the A-team lifecycle.java, debugger on the yellow line below Cap. Any solution?

    Import oracle.adfmf.application.LifeCycleListener;

    private static ADFMobileLogger sLog is ADFMobileLogger.createLogger (InitDBLifeCycleListener.class);.

    ..

    public void start()

    {

    sLog.fine ('Excuting InitDBLifeCycleListener.start method');

    new UsageTracker () .registerStartAppMessage ();

    DBPersistenceManager h = new DBPersistenceManager();

    pm.initDBIfNeeded ();

    }


    Kind regards

    Hendry

    Hendry,

    So, you also use the persistence for MAF 2.0 Accelerator, right?

    If so, you must follow the steps in the section "Migrating an Application of MAF 2.0" that you can find in the release notes

    Steven Davelaar,

    Oracle Mobile A-team.

  • Get the RANK of values to the end user using the A-team

    In my rest, class of service (Department) it is a function (POST) who receive the range of values of its consumers and returns List < and >.

    It is the function

    @POST

    @Path("{from}/{to}/Departments")

    @Produces ({"application/json"})

    public list < departments > findRange (around @PathParam("from"), around @PathParam("to") to) {}

    Return super.findRange (new int [] {, to});

    }

    Persistence A-team Accelerator, duties DepartmentSevice (DC) are pre-built, please how I can configure rang of function values in the class DepartmentService and call or manipulate the AMX page so that the end user can be entered range values during the operation in his mobile?

    Rest of the a-Team/json in place of Images:

    get2.gif

    get1.gif

    Thank you.

    Best regards

    Bartholomew

    Hi Steven thanks for your comment I intentionally use the post to test whether it is possible to rotate to GET the other way round.so I wore your instructions and it workd

    Thank you very much

    Best regards

    Bartholomew

  • How can I use the search option in the pdf file in my mobile? [Android]

    How can I use the search option in the pdf file in my mobile?

    Yes, the text search is also available on Android Acrobat. After you open a PDF file, look in the top bar of the magnifying glass icon. If the top bar is not visible, tap anywhere on the screen to make it appear again.

    Thank you

    Acrobat DC team Mobile

  • PDF created by presenter on mobile? [Android]

    Hello

    I got a large pdf file (1 GB) that was created by Presenter 7 in 2012.  He has several videos embedded, and 200 + slides. The file opens in the current Windows version of the Acrobat Reader software.

    On the Mobile Reader on my Samsung Galaxy Tab S version it shows just a blank page.

    This is expected behavior?  Can I try, or am I stuck with this file under Windows?

    Hello

    Acrobat Android currently does not support playback of the videos embedded in PDF format. But I'm not entirely sure why the pages containing the slides are not rendered. Could you share the PDF file with us so that we can investigate the matter? Since the file too large to send by e-mail, he could upload you somewhere and send us the link to [email protected]?

    Thank you

    Acrobat DC team Mobile

  • Issue of custom resources AMPA

    [JDev 12.1.3, MAF 2.2.0 AMPA 12.1.3.2.32]

    http://www.Ateam-Oracle.com/a-team-mobile-persistence-Accelerator-release-12-1-3-2-now-available/

    Custom resources medium?

    By the foregoing, I created a custom in the screen 'Details of the resource' resource entry Wizard.

    But while the information I've entered seems to be correctly filled as a customMethod in

    persistence - mapping.xml, there is no custom method generated in my service class

    (according to my GiT, this file was not affected at all by the Wizard).

    Has anyone other that saw issue or whether there is a work around?

    Thank you

    Paul Young

    Paul,

    On the last page of the wizard, you can set generator options, one of them is a chedhkbox to regenerate the service class that is unchecked by default. Have you checked this box?

    Steven Davelaar,

    Oracle Mobile & Cloud A-team.

  • How to use installation of Oracle MCS with MAF database offline

    Hi all

    I want to integrate my mobile application with the installation of database offline for service mobile cloud and its policies, to store my data if my app doesn't have any internet connection, but whenever my mobile app gets the internet connection my data stored in the cache / offline automatically gets synchronized to the mobile cloud service.

    Can someone give me the MAF MCS utility class to achieve it or any which sample or any video will be really appreciated.

    Thank you.

    Hi, diattou, another alternative is to operate the accelerator of persistence A-team (AMPA) - latest version here: http://www.ateam-oracle.com/a-team-mobile-persistence-accelerator-release-12-1-3-2-now-available/.  You can consume any product Remaining in the MCS and let A-team Accelerator persistence generate all Classes Java necessary for you.

    MAF 2.3 and 2.4 (coming in first part of 2016) will integrate these read offline connection and written in a declarative way.  In the meantime, however, AMPA is a good way as well.

    Thank you

    Joe Huang

  • Just thought

    Their less expensive tablets on the market with much better support and more quickly update cycle then sony has.

    Is their all what sony will do to compensate for this and address this issue?

    many people paid like + 400 Euros for their tablets.

    Sony has even promised jelly bean to follow in September December January February then then the delay more at end of April may

    Sorry, but I'm not happy at all I'm verry p-issed

    Sony mobile team is expected to return to division tablet which is where this tablet belong.

    Not vaio sony team have clearly no experience or any idea how android is suppose to work.

    I'm sorry well incase working you on jelly bean, but see how fast updates rolls and taking account of the atm of questions I see rather team mobile sony to support the Tablet s s1 and compressed sony xperia

    especialy the Tablet xperia xperia branding s otherwise its just misleading and a pure scam and you who have known her.

Maybe you are looking for

  • Download speed

    Why does take so long to download Apple software? It took two days and three restarts to download El Capitan (6 GB) and at least 12 hours to download only 1.8 GB to 2.8 GB for Final Cut. Similarly, although technology is impressive, the download of t

  • C309g: c309g print in pink

    Hi guys,. For many months now has been printing my printer in pink. Went to officeworks they said that it is the print head, could be damaged. Since I have a lot of ink in stock, I like this repaired. Could you please say solutions Thank you Matt

  • I can open Office configured for text to speech in Windows XP?

    Original title: Windows XP Pro I have Windows Xp, I can open Office configured for speech synthesis

  • Unlock the Bootloader of A2109... on a Mac?

    Hi you all... If any of you guys visited the other specific forums, y ' All can recognize my dilemma. Because these forums were specialized, I thought that I would like to tender hand to a greater range of users/developers to see if someone could rea

  • Telepresence by PaloAlto problems

    Have a client who has a configuration of telepresence and has some strange problems with video through their firewall PaloAlto. Installed control VCS / Highway to pair with the motorway in a DMZ with dal interfaces configuration for the PaloAlto They