how to replace annotation with xml easily in Mybatis - mybatis

Recently I had a problem .I need to use mybatis in xml Way instead of annotation way . And I have a lot of annotationed Mapper class .Do i hava an easy to to to this or I must write mapper.xml one by one .
Any advice will be appreciated.

This is not exactly an answer as it is series of steps you need to follow for the transition. Follow this example where everything is simple and self-explanatory right from scratch to get you started.

Related

function countByExample mybatis-generator help me

I have a problem, in my picture. I use mybatis and countByExample method was generated by MyBatis Generator. Can u help me and see it?
https://i.stack.imgur.com/e3arE.png
https://i.stack.imgur.com/WOp1f.png
It looks like you are reusing jobCtrlExample between method calls. if you do that, then you need to clear the previous conditions before you set new conditions. Probably adding this line will fix it:
jobCtrlExample.clear();
It would be better to create a new example class for every method.

Talend: How to get instance of a component in tjava

I want ask if there is way to get an instance of a component if a job (ex:tmap, tmysqlinput) in tjava code and then manipulate it manually using code?
Thank you
Very hazardous. Looking at the generated Java code will give you some answers (I think so).
In fact, accessing to some objects properties is possible (there is blogs and articles about this) but changing anything seems to be dangerous (IMHO).
TRF

EMF namespace URI/prefix is null

I have to use EMF to create a EMF Generator Model from an existing ecore diagram, but it gives me namespace errors when trying to do so.
Here is is the screenshot of the two errors.
I think the error might be in the ecore file (XML), but I have no idea what to write, as I have only been using the GUI tool to create the ecore model...
My ecorediag file is here, and my ecore file is here.
I have bad experience with EMF, as it has never worked smoothly without any hiccups, and this is yet another problem, however, I am forced to use it.
I tried Googling the errors, but only 9 and 8 hits were returned, most of which did not help solve the problem.
What do I need to edit in the ecorediag or ecore file to be able to generate my EMF Generator Model?
For the record, I am using Eclipse 4.2.2.
change nsURI in to "http: ///ecore_file_name.ecore" and nsPrefix into "ecore_file_name" it woks great
The solution I found was to rewrite the whole project from scratch.
The approach was to carefully generate the genmodel for every change I made to the ecore file (adding/renaming/removing attributes/classes) to make sure nothing bad happened between any alterations to the model. By following this approach, you will be able to isolate the problem if something goes wrong.
However, I am still looking for another solution/answer other than rewriting everything.

Name and location of snippet for Menu with param in LiftWeb?

Sorry if this sounds stupid but I'm really new to LiftWeb and just struggling with the basic stuff:)
So I have a parametrized site map entry in Lift's bootstrap. This should be for the view page of an object of type MyItem. The URL would be like: "/myitems/UUID".
Menu.param [UUID]("MyItemView", "MyItemView", p=>Full(UUID.fromString(p)), p=>p.toString) / "myitems"
This adds the sitemap entry correctly. If I go to "/myitems/NOT_AN_UUID", it will throw the "Invalid UUID" exception as expected. But if I go to "/myitems/UUID" I get 404.
I know that I need a view and a snippet class that takes UUID as parameter in order for this to work but I have no idea how to name these and where to place them.
Btw, how would one new to Lift learn something like this? From the hundreds of articles and samples out there I found many to mention more complex stuff but haven't seen any to mention a basic thing like this. Do you know any secret start-up documentation for human beings?
Update: To summarize in case all you see above is jibber-jabber :) HOW DOES LIFT LOCATE TEMPLATES/VIEWS/SNIPPETS FOR PARAMETRIZED MENU ENTRIES?
It was actually the obvious answer. The template name is obtained from the path and the snippet can be whatever you want as long as you call it from the template xml.
I need to get used to all this convention over configuration :) However it would be nice for someone to tell you what is the convention.

How can I create or associate a super column to a column in Perl using Net::Cassandra?

How can I create or associate a super column to a column in Perl using Net::Cassandra?
I just chatted with the module author and he doesn't understand the question. Then he guessed you want batch_insert which can take a supercolumn.
If that doesn't help, perhaps you step back, try to explain what you want to achieve and rephrase the question.
Best way, IMHO, is to submit a request to add information about super columns into documentation into Net::Cassandra bug tracker.
batch_insert is one way like daxim says; another way is to just use normal insert but specify super_column in the ColumnPath as well as the column_family.
It looks like Net::Cassandra stays pretty close to the thrift api, so this should be useful: http://wiki.apache.org/cassandra/API