Mapping heterogenous object models

I have two different object models that contain similar information. My ultimate goal is to transfer the data from one into the other. Is there a utility to can facilitate this? An O/O mapping utility?
I have some experience with O/R mapping utilities, like hibernate and castor, and I believe that the functionality that I require is something similar. Somehow a mapping file would exist that says "this goes there and that goes there" and then maybe an engine which takes care of the object instanciation and calls to the getters and setters.
Is there some tool out there that does something like this? Any advice would be greatly appreciated. Have a good day.
T. Urtle Hawk

How are you 'transferring' the objects? In memory? Over a network?
If the former, then there probably is not a generic tool. You could use reflection and a configuration file to detail the mappings. It would probably only involve a handful of classes.
If sending over the network, serialize to XML and writer parsers on both ends (I am assuming that since the data is similar, your serialization routines will produce a common output). Or use JAXB and create a schema for each object.
There may be a tool to handle object mappings over a network. I'd be surprised to see one deal with mappings within a JVM. But then again, I don't get out much.
- Saish
"My karma ran over your dogma." - Anon

Similar Messages

  • Large object model best practices

    Are there recommended practices for mapping large object models? Seems like there should be API support for this so that developers can automate map generation. I just can not see mapping 100s of classes by hand.
    What about change management? How do folks manage schema changes?
    Feel free to point me at the docs and tell me to FTFM. ;-)

    Thanks for the reply James but I'm still unsure how to avoid hand mapping 100's of classes. Are you suggesting that TopLink can load my object model (1000+ classes) and generate DLL and mappings that will simply work?

  • Mapping Variables(Object View) to Measures(Model View)

    Hi,
    In my AW, I have created a cube, And then I have created a new variable in the object view and populated it using load programs. Now. when I try to create a measure in the model view of the same cube based on this variable, I cannot see any option for assigning a variable to a measure. Can someone please help me out in doing this?
    I need the measure in the model view, because it looks like, when I create a relational view, only the measures that are defined in the model are added to the view and not the variables available in the object model.
    Thanks,
    Bharat

    Hi Bharat,
    The mapping editor is used to map a measure to a relational data source. Therefore, unless you convert your data source used by your DML program to a relational table/view (if it is a text file you can use an external table to present the data to AWM as a relational table, or if it is an Excel spreadsheet and your database is on Windows you can use the heterogenous gateway service to load directly from Excel by exposing the Excel worksheet as a relational table) you will not be able to use the mapping editor.
    To assign an OLAP variable to an measure within a cube you will need to create a custom calculated measure. This will allow you to create a measure that "maps" to your OLAP DML program. There is an Excel utility on the OLAP OTN home page that allows you to create custom calculated measures (at the moment this feature is not AWM10gR2 - but is available within AWM 11g). Click here for more information:
    http://download.oracle.com/otn/java/olap/SpreadsheetCalcs_10203.zip
    My advice would be to try and convert your data source to a relational table/view and using the mapping editor. This will allow you to benefit from the many new features within OLAP cube storage such as compressed composites, data compression, paralled processing, partitioning and aggregation maps. Of course you can code all this manually but it is much easier to let AWM do all this for you via a few mouse clicks. Please note - that everything you build outside of the AWM model view has to be managed (defined, updated, backed up etc) by you rather AWM. So while there are lots of advantages of using OLAP DML, I personally always try to load data into my OLAP cubes using AWM mappings and save OLAP DML for providing the advanced types of analysis that make OLAP such an excellent calculation engine.
    Hope this helps
    Keith Laker
    Oracle Data Warehouse Product Management
    OLAP Blog: http://oracleOLAP.blogspot.com/
    OLAP Wiki: http://wiki.oracle.com/page/Oracle+OLAP+Option
    DM Blog: http://oracledmt.blogspot.com/
    OWB Blog : http://blogs.oracle.com/warehousebuilder/
    OWB Wiki : http://wiki.oracle.com/page/Oracle+Warehouse+Builder
    DW on OTN : http://www.oracle.com/technology/products/bi/db/11g/index.html

  • Ho to change the mapped System object to the Model to another System object

    Hi All,
    Initially i have created one system object (TestSystemForVC) for testing the VC application. Then i have started completing the whole development in that perticular model object. many data soruce objects are added to the model using the TestSystemForVC system object.
    Now i have created one more system object pointing to Otherclient. in R3. How make use of the same model pointing this new System object for working properly with out doing the complete development of that model.
    I just want to map the existing model to new system object. Can any body tell me how to achieve this.
    Regards
    Vijay

    Hi Vijay,
    therefore you can use the Alias Manager (see attachment). There you can replace all other system aliases.
    Best Regards,
    Marcel

  • Mapping an object using values from multiple tables

    Is it possible to use values looked up in other tables when mapping an object?
    For example: I have three tables. In table 1, I have fields for 'cityCode' and 'stateCode'. Table 2 is a state table which contains a list of stateCodes and corresponding stateIds. Table 3 is a city table with cityCodes listed by stateId (the city code is unique within the stateId but can be duplicated under other stateIds). Table 3 also contains the cityName for the matching cityCode/stateId pair.
    I am ultimately trying to match a cityName to a cityCode. I can't figure out how to tell toplink use the stateId returned when mapping Table 1 to Table 2 via stateCode when mapping cityCode in Table 1 to Table 3.
    Any help is greatly appreciated
    --matt                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    What does your object model look like, do you have a single object with data from all three tables in it?
    <p>
    In general because the cardinality of the tables and usage does not match, I would not recommend using multiple tables to map this. Instead define a CityNameManager class that preloads and stores all of the city names for each state, (possible lazy initializing each set of cities per state). Your getCityName() method in your class would then just use this manager.
    <p>
    You could map the multiple tables but it may be difficult, and would most likely need to be read-only because I don't think you want to insert into the table2 or 3. You basically have a foreign key table1.stateCode => table2.stateCode, (table1.cityCode, table2.stateId) => (table3.cityCode, table3.stateId). You probably cannot define this in the Mapping Workbench, so would need to use the ClassDescriptor code API and an amendment method. If you can't get the foreign keys to work you can always use the descriptor multipleTableJoinExpression and define the join directly.
    <p>
    You could also define a OneToOneMapping to the CityName from your object using the cityCode and using a selectionCriteria() on your mapping to provide an expression that uses the getTable() method to join to the intermediate table.
    <p>
    <p>---
    <p>James Sutherland

  • Mapping an object's property to a field computed from 2 database fields

    Hi,
    Is there a way to do a WorkBench mapping of a business object's property to a field computed from 2 separate database fields?
    If not in WB, how would you do that?
    Thanks,
    Michal

    You could define this mapping through a TransformationMapping using you own code in the mappings transformer to divide the values. However you are probably much better off to just map the two values directly, and add a method in your object model to get the rate buy dividing the values.
    If terms of being able to order-by the calculated value in the a TopLink query, mapping the calculated value using a transformation mapping would not help this.
    To do this order by you can use,
    query.addOrdering(ExpressionMath.multiply(ExpressionMath.divide(builder.get("numberOfSuccess"), builder.get("numberOfAttempts")), 100);

  • Regarding Server object Model in Custom Windows service

    Hi,
    I am writing a custom windows service to update the Sharepoint 2013 list every morning. But when i am try to create a SPSite object by passing the SITE URL it is throwing the below error.
    Code :
    using(SPSite site = new SPSite(SITE_URL))
    Error :
    "The Web application at "" could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application."
    Even though the SITE URL is correct. It working while browsing in explorer. 
    Not sure why it is happening. 
    Thanks.
    Akhilesh Rao

    Hi Akhilesh,
    Please try to add yourself to the WSS_ADMIN_WPG group on the server.
    Or here are the most common reasons this error can occur:
    1.The code is executed on a different machine - The SharePoint object model (except the Client API) requires to be run on the SharePoint server itself. It is not possible to run the application on a server which is not within the same SharePoint farm the
    code is trying to access.
    2.Insufficient Rights on the site collection - The code is executed in context of an account which does not have read permission on the site collection
    3.Incorrect Url being used - Verify that the site works correct in a browser and double check that the server is correct registered in the AAM settings
    4.Incorrect bitness - The SharePoint object model needs to be executed with the same bitness as the operating system. That means you cannot use the SharePoint object model in a 32-bit application if the Operating System and SharePoint are installed as 64-bit
    version. Ensure to compile the project using the correct bitness (64-bit on a 64-bit machine vs. 32-bit on a 32-bit machine)
    5.Incorrect .NET framework version -  Ensure that the project is configured to use .NET 3.5 for SharePoint 2010 and below and .NET 4.0 for SharePoint 2013
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Create a site collection with dedicated content db with the help of server object model

    Hi,
     I have a requirement to implement a create a new site collection with dedicated content db. i have got 2 PowerShell scripts which does the same. first i will  create a content  db and then create the sitecollection with contentdb
    parameter with the created contentdb name.
    Now the site collection created must contain few doc libs and few splists with look up columns, people picker data type, multiline of text, single line of text,choice field. hence i am thinking the below approach:
     1) create a web template and include sp doclibs, splists , site columns in this.
     2) i am thinking of a ui design to create the below:
     These are called "projects" which is actually the site collection with the doclibs, splists and must be created by sharepoint admin on click of a link in my landing page.end users access these "projects"  aka 
    "site collections" and uploads the documents into these projects and collaborate.
    so my question is :  On click of a button can I create a site collection with a dedicated content db based on the web template created with the  hel of  server  object model?
    The other approach is on click of this button call the power shell script which accepts the sitecollection name and contentdb name as parameter. is this possible in  server obj.model ?
    passing a paramter from code behind- visual web part ui to power shell ?
    and it should create the site collec based on the web template and create the content db.
    my doubt #3 : will it not throw error "request timed out" when creating the site collec and contentdb from ui ?

    Try below:
    http://sharepoint.stackexchange.com/questions/21606/programmatically-create-a-site-collection-in-an-existing-mounted-content-databa
    PowerShell is just a wrapper for the object model. You shouldn't need to reference PowerShell in your feature, just create the new site collection with C# inside your feature. There's a blog post here that illustrates some code that may get you started.
    http://blog.mastykarz.nl/programmatically-creating-sites-site-collections-custom-web-template/
    http://blogs.msdn.com/b/vesku/archive/2014/06/09/provisioning-site-collections-using-sp-app-model-in-on-premises-with-just-csom.aspx
    # Enable the remote site collection creation for on-prem in web application level
    # If this is not done, unknon object exception is raised by the CSOM code
    $WebApplicationUrl = http://dev.contoso.com
    $snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
    if ($snapin -eq $null)
    Write-Host "Loading SharePoint Powershell Snapin"
    Add-PSSnapin "Microsoft.SharePoint.Powershell"
    $webapp=Get-SPWebApplication $WebApplicationUrl
    $newProxyLibrary = New-Object "Microsoft.SharePoint.Administration.SPClientCallableProxyLibrary"
    $newProxyLibrary.AssemblyName = "Microsoft.Online.SharePoint.Dedicated.TenantAdmin.ServerStub, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
    $newProxyLibrary.SupportAppAuthentication = $true
    $webapp.ClientCallableSettings.ProxyLibraries.Add($newProxyLibrary)
    $webapp.Update()
    Write-Host "Successfully added TenantAdmin ServerStub to ClientCallableProxyLibrary."
    # Reset the memory of the web application
    Write-Host "IISReset..."
    Restart-Service W3SVC,WAS -force
    Write-Host "IISReset complete."
    If this helped you resolve your issue, please mark it Answered

  • Conflict between Client object model and Item Updated Event Receiver in sharepoint 2010

    Hello All,
    As per my requirement I have a two custom list.
    Agent Details
    Port Name
    Agent Details contains Agent code, Port Name,  email, address and phone of Agent. Its possible that one Agent Code is connected with multiple Port Name.
    Basically what I am doing is I am getting port name connected with Agent code, using jquery and bind those values with check box(using javascript created dynamically) and bind all with Div tag.
    Now when my custom edit form of Agent list open up it shows me different port name binding with checkbox group.
    when user select the check box and click confirm button my clicent object model script will run and add this selected value into Port Name list. 
    After confirm one more button named Save will enable asking user to edit the email, phone or address value and when I click on save my Item updated event fires which update the values of the selected port name(These port name I am getting from port
    name list) to Agent Details custom list.
    Now when I am trying to update the values my event receiver fires or some times it got stuck(not firing). So could you please help me the possible alternative for this requirements.
    Can we user the Ecma Script(Client object model to preserve the value of selectec port) and Item updated event receiver on the same time?
    Is anything am doing wrong then please guide me.

    Hi,
    As I understand, when you updated values in the agent details list the Item updated event receiver got stuck sometimes.
    The item update event receiver will fire after the item has been saved, and the client object model script or the Ecma Script runs before the item is saved, so there is no conflict between the client object model script and item update event receiver.
    You could find out the reason about the item update event receiver gets stuck by debugging the event receiver.
    When you want to debug your event receivers, you have to attach to OWSTIMER.EXE and wait till they are executed. You can control this behavior using the Synchronization attribute. Also, if you’re looking for an easy way to debug an event receiver without
    having to manually attach a debugger to your code, you can use the System.Diagnostics.Debugger.Launch() method.
    The articles below are about how to debug in the event receiver in SharePoint 2010.
    http://sharepoint-kings.blogspot.jp/2013/02/debugging-event-receivers-in-sharepoint.html
    http://chakkaradeep.com/index.php/event-receivers-in-sharepoint-2010/
    http://sharesaint.com/?p=77
    Best regards,
    Sara Fan
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to get all previous versions page contents of a publishing page using SharePoint Client Object Model 2010

    How to get all previous versions page contents and other field values of a publishing page using SharePoint Client Object Model 2010?
    Thanks,
    Osmita

    Hi Osmita,
    Greetings.
    Here are the links that helps you. It has code attached to it.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/a0d2ab40-99ba-4368-8505-1dc559ef6469/get-content-of-previous-version-of-page-sharepoint-2010?forum=sharepointgeneralprevious
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/faaf419f-997e-4150-9911-48cc375c3b46/how-to-get-previous-published-versions-of-publishing-pages-in-sharepoint-2010?forum=sharepointdevelopmentprevious
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • How to get the values of managed metadata columnn through object model

    Hi,
    I need to read the values from a managed metadata column, which is set to display entire path.
    Eg. My value looks like
    Critical:Important:Interesting:Routine:Not Evaluated
    without hardcoding these values, can i find which level of child has been chosen.
    if its not evaluated, i should find like last child like that..
    any way of doing that?
    Aruna

    Hi,
    thanks for the above reply.
    i got a new requirement as,  following is my managed metadata structure user selects the values from the below structure. i need to find the matching items with another list of same structure. the condition for matching is, if the user selects All,
    in the otehr list if the value in the region column equals any of the values in the structure below All like ema, denmark,nordborg is considered to be matched. if the user selects Denmark then the list contains denmark, nordborg and office is matched. means
    parent and its child contents are matched if the parent is chose. if the child is chosen only the exact value from other list(office==office in otehr list) is considered to be matched. how can i achieve it through object model coding?
    Aruna

  • Trying to use Web LCID property to get the List name in client object Model

    Hi ,
    I am trying to change the "Personal Documents" list NoCrawl property under MySite using SharePoint Client Object Model. As we use  web.Lists.GetByTitle("Personal
    Documents"); method to get the list,but here problem is :for different language List name is in their language.So I tried to use LCID property of the WEB and
    have taken key-value pair (PersonalSiteOnet_List_PersonalDocuments) from the resource file for that language from 14 hive.
    Example:I have selected Spanish language .there are so many LCID for Spanish language but Microsoft has given only one language pack for Spanish.
    Then,My Question is that
    "All LCID for Spanish language are using same Spanish language pack dictionary file OR something else"
     

    Hi,
    According to your post, my understanding is that your requirement is getting list in different language.
    Here are two ways for your reference:
    1. We can use getById method instead, so that we can avoid the language issue.
    2. We can use an array to store the different list name in different language in you JavaScript code, then use the code snippet below to get the list:
    var userLcid =_spPageContextInfo.currentLanguage;
    var localizedStrings = {
    ListName: {
    _1033: "EnglishName",
    _3082: "SpanishName"
    var listName=localizedStrings.ListName["_" + userLcid];
    var list=web.Lists.getByTitle(listName);
    More information:
    http://msdn.microsoft.com/en-us/library/hh670609.aspx
    http://wellytonian.com/2012/11/language-packs-sharepoint-2010/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Editable field in ALV Object Model

    Hi Guys,
    I'm using method cl_salv_table=>factory to display an ALV (Object Model) in my report.
    I want to "open up" one field for user entries, in other words make one column of my table editable.
    I assumed to find the respective methods in class cl_salv_table, cl_salv_columns_table or cl_salv_display_settings, so far without getting anywhere.
    I know about the field-catalogue and the method set_ready_for_input in class CL_GUI_ALV_GRID - it's not working once you're in the object model.
    Any ideas how to do that?
    Thank you!
    With best regards,
    Andreas

    Hi Guys,
    I'm using method cl_salv_table=>factory to display an ALV (Object Model) in my report.
    I want to "open up" one field for user entries, in other words make one column of my table editable.
    I assumed to find the respective methods in class cl_salv_table, cl_salv_columns_table or cl_salv_display_settings, so far without getting anywhere.
    I know about the field-catalogue and the method set_ready_for_input in class CL_GUI_ALV_GRID - it's not working once you're in the object model.
    Any ideas how to do that?
    Thank you!
    With best regards,
    Andreas

  • ReportClientDocument object model, simple question

    How can I modify report in runtime using RAS SDK (ReportClientDocument obj model)?
    I tried several different ways to modify report (change date format of the field, change field width...), and nothing happens.
    all properties seems to be changed but, reportdocument object remains unchanged.
    here is the code I used:
                   object path = (object)@"C:\Program Files\Business Objects\BusinessObjects Enterprise 11\Samples\EN\Reports\cr_ListOfLateFeesToBeExempted.rpt";
                   ReportClientDocument crReportDocument = new ReportClientDocument();
                   crReportDocument.ReportAppServer = "sizlak";
                   crReportDocument.Open(ref path, 0);
                   CrystalDecisions.Shared.ConnectionInfo crConnectionInfo = new CrystalDecisions.Shared.ConnectionInfo();
                   crConnectionInfo.ServerName = "***";
                   crConnectionInfo.DatabaseName = "****";
                   crConnectionInfo.UserID = "***";
                   crConnectionInfo.Password = "***";
                   TableLogOnInfos crTableLogonInfos = new TableLogOnInfos();
                   crViewer.LogOnInfo = crTableLogonInfos;
                   CrystalDecisions.ReportAppServer.ReportDefModel.ReportObjects sss = crReportDocument.ReportDefController.ReportObjectController.GetAllReportObjects();
                   foreach(CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject ss in sss)
                        Response.Write("<br>" + ss.Kind);
                        if(ss.Kind == CrystalDecisions.ReportAppServer.ReportDefModel.CrReportObjectKindEnum.crReportObjectKindField)
                             CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject myField = crReportDocument.ReportDefinition.FindObjectByName(ss.Name) as CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject;
                             if(myField.FieldValueType == CrystalDecisions.ReportAppServer.DataDefModel.CrFieldValueTypeEnum.crFieldValueTypeDateField ||
                                  myField.FieldValueType == CrystalDecisions.ReportAppServer.DataDefModel.CrFieldValueTypeEnum.crFieldValueTypeDateTimeField)
                                  myField.Height=150;
                                  myField.Format.HorizontalAlignment = CrystalDecisions.ReportAppServer.ReportDefModel.CrAlignmentEnum.crAlignmentRight;
                                  myField.FontColor.Color = 32000;
                                  myField.Border.RightLineStyle = CrystalDecisions.ReportAppServer.ReportDefModel.CrLineStyleEnum.crLineStyleDouble;
                                  myField.Width = 2;
                                  myField.Border.HasDropShadow = true;
                   crViewer.ReportSource = crReportDocument;

    hi, i am using jbuilder 2006 for my j2ee project.
    i want to see the object model diagram which shows me
    the whole existing project in one place stating how
    objects are related. so ---
    1. how can i do that in jbuilder?RTFM. If it's supported in the version of JBuilder you use (I think it's only supported in the enterprise edition) it will be mentioned in the manual.
    2. are there any other good tools/softwares
    available?yes.
    3. any pointers for preparing this diagram is
    appreciated.
    Sun's course number OO-226

  • Getting 'File not found' error while using server object model code

    Hi,
    I am using server object model code to pull list data in a console application. My machine has standalone installation of SP 2010. I am getting error 'File Not Found', however the same operation is working fine with client object model code.
    Code I am using:
    string strURL=http://servername/sites/sitename;
    SPSite siteObj=new SPSite (strURL); //getting error here.
    I have already checked the below,
    1. Framework being used is 3.5.
    2. I have proper access to site.
    3. Running visual studio as admin.
    Any help is much appreciated.
    thanks
    Tarique
    thanks and regards Tarique Aslam

    Hello Tarique ,
    Couple of pints need to check:
    1. User running the console application needs to have at least read permission to the SharePoint databases
    2. Set application by changing the "Platform target:" option on the "Build" to "Any CPU"
    Also refer this similar thread:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2a419663-c6bc-4f6f-841b-75aeb9dd053d/spsite-file-not-found
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

Maybe you are looking for

  • Removing an old email account

    I found out how to hide the old account but I have no idea how to delete them??   Does anyone know..Thank You

  • 1042N-A-K9 Default Username and Password

    I just recieved in the mail an aironet 1042n ap. It was assigned an ip of 192.168.1.254 by my router. When I attempt to connect it prompts for a password and states the default username and password is admin and 1234. It will not except this, or Cics

  • Multiple Selections Disabled after validation

    Hi experts , Couldsomebody please correct me on this :- I have a validation check for a select-option with NO Intervals. Any incorrect value in the Select option then an error message pops up . Now if there are multiple values in the Selct-option mul

  • Help needed with Time Machine

    I've installed Boot Camp because I wanted to play an old game. I understood eventually that laptops are not made for that purpose (my one year old MBP was heating too often and I didn't like that). Unfortunately even during that period I've started e

  • My MacBook Keeps shutting down without warning

    Every since downloading Mavericks I have been having problems with my MacBook Pro. The worst thing is that the computer randomly shuts down without warning. Today this has happended about a dozen or more times. Every time it generates a report that i