Why method parameter end with three dots

i generate hibernate pojos + hybernate mapping + dao. in dao class i have some doubt in coding please clear.
package org.triology.blog.hibernate;
import org.triology.blog.GenericDAO;
import java.io.Serializable;
import java.lang.reflect.ParameterizedType;
import java.util.List;
import java.util.Map;
import org.hibernate.Criteria;
import org.hibernate.FlushMode;
import org.hibernate.Query;
import org.hibernate.LockMode;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Example;
* Generated at Wed Jul 30 16:57:35 IST 2008
* @author Salto-db Generator v1.0.16 / Pojos + Hibernate mapping + Generic DAO
* @see http://www.hibernate.org/328.html
public abstract class AbstractHibernateDAO<T, ID extends Serializable> implements GenericDAO<T, ID> {
private Session session;
private Class<T> persistentClass;
public AbstractHibernateDAO() {
this.persistentClass = (Class<T> ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];
public void setSession(Session session) {
this.session = session;
protected Session getSession() {
if (session == null)
session = HibernateUtil.getSessionFactory().getCurrentSession();
return session;
public Class<T> getPersistentClass() {
return persistentClass;
@SuppressWarnings("unchecked")
public T getById(ID id) {
return (T) getSession().get(getPersistentClass(), id);
@SuppressWarnings("unchecked")
public T getById(ID id, boolean lock) {
if (lock) {
return (T) getSession().get(getPersistentClass(), id,
LockMode.UPGRADE);
} else
return getById(id);
@SuppressWarnings("unchecked")
public T loadById(ID id) {
return (T) getSession().load(getPersistentClass(), id);
public void save(T entity) {
getSession().save(entity);
public void update(T entity) {
getSession().update(entity);
public void saveOrUpdate(T entity) {
getSession().saveOrUpdate(entity);
public void delete(T entity) {
getSession().delete(entity);
public void deleteById(ID id) {
getSession().delete(loadById(id));
@SuppressWarnings("unchecked")
public List<T> findAll() {
return findByCriteria();
* Use this inside subclasses as a convenience method.
@SuppressWarnings("unchecked")
protected List<T> findByCriteria(Criterion... criterion) {
Criteria crit = getSession().createCriteria(getPersistentClass());
for (Criterion c : criterion) {
crit.add(c);
return crit.list();
* Find by criteria.
@SuppressWarnings("unchecked")
public List<T> findByCriteria(Map criterias) {
Criteria criteria = getSession().createCriteria(getPersistentClass());
criteria.add(Restrictions.allEq(criterias));
return criteria.list();
* This method will execute an HQL query and return the number of affected entities.
protected int executeQuery(String query, String namedParams[], Object params[]) {
Query q = getSession().createQuery(query);
if (namedParams != null) {
for (int i = 0; i < namedParams.length; i++) {
q.setParameter(namedParams, params[i]);
return q.executeUpdate();
protected int executeQuery(String query) {
return executeQuery(query, null, null);
* This method will execute a Named HQL query and return the number of affected entities.
protected int executeNamedQuery(String namedQuery, String namedParams[], Object params[]) {
Query q = getSession().getNamedQuery(namedQuery);
if (namedParams != null) {
for (int i = 0; i < namedParams.length; i++) {
q.setParameter(namedParams[i], params[i]);
return q.executeUpdate();
protected int executeNamedQuery(String namedQuery) {
return executeNamedQuery(namedQuery, null, null);
@SuppressWarnings("unchecked")
public List<T> findByExample(T exampleInstance, String[] excludeProperty) {
Criteria crit = getSession().createCriteria(getPersistentClass());
Example example = Example.create(exampleInstance).excludeZeroes().enableLike().ignoreCase();
for (String exclude : excludeProperty) {
example.excludeProperty(exclude);
crit.add(example);
return crit.list();
in above class my doubt is
* Use this inside subclasses as a convenience method.
@SuppressWarnings("unchecked")
protected List<T> findByCriteria(Criterion... criterion) {
Criteria crit = getSession().createCriteria(getPersistentClass());
for (Criterion c : criterion) {
crit.add(c);
return crit.list();
why we pass findByCriteria parameter end with three dots (Criterian...)
Edited by: BalaTTPL on Jul 31, 2008 8:53 AM

protected List<T> findByCriteria(Criterion... criterion) {
    Criteria crit = getSession().createCriteria(getPersistentClass());
    for (Criterion c : criterion) {
        crit.add(c);
    return crit.list();
}The "Criterion..." argument just means that you can call the method with any number (zero or more) of Criterion references. Within the method criterion is treated like an array - for instance in the for loop.
The notation is known as "varargs" and is described in the JDK1.5 [Tech notes|http://java.sun.com/javase/6/docs/technotes/guides/language/varargs.html].

Similar Messages

  • LR3 bug: Files from a folder with name ending with "." (dot) cannot be imported

    This is a weird one Surprisingly, directories with names ending with a dot, don't show in the Import dialog and also cannot imported by using synchronization. So, if you have any folder named "Flowers, trees etc." ... you cannot import it.

    And what happens if you delete the dot at the end of the folder name?

  • Cd... with three dots after the cd would take you back two directories NOT ANYMORE

    .. one dir
    ... two dirs
    does not work anymore

    What operating system?  I went back to Windows XP and it doesn't do that.  It simply ignores three dots, just like it does with current operating systems.
    It is always helpful if you would include version and environment information when statements are made.  Without that, everybody has to end up guessing.
    .:|:.:|:. tim
    this thing on the top of the screen does not help?
    Windows Server forums > 
    Windows Server 2012 General

  • What does the little bubble with three dots on the lower left side of the Messages screen on my iPhone 4 mean?

    frequently, after messages are exchanged on my iPhone 4 there is a little bubble on the lower left of the message screen that has three dots. What do they mean?

    It means the other person is typing.

  • JButton with three dots

    Hi,
    how can I recognize whether a text within the JButton fit the bounds to avoid the "..." text instead of the proper value?

    This might work (untested):
              FontMetrics fontMetrics = yourButton.getFontMetrics(yourButton.getFont());
              textWidth = fontMetrics.stringWidth(yourButton.getText());
              int buttonWidth button.getWidth()-10;  //subtract the button's margins, probably a better way to do this
              if(textWidth > buttonWidth){
                        //the button will display ...
              }

  • Camera's automatic focus function stopped working. Factory reset did not work. (Yes the three dots were pressed). What should I do?

    I enjoyed taking pictures with one touch of the screen but now the camera does not focus no matter what I do. I did try to take it without the camera sub-menus by pushing the button with three dots and without. The focus simply does not work!
    What should I do?
    I contacted LG support and they told me the whole thing might take 1-2weeks. That seems too long for me to live without a phone. Any suggestions?
    Thanks for reading my question,
    Josh

        Let's get this resolved kimjoshy! If you completed a factory reset and still unsuccessful please respond to my direct message so I may review options. Thank you.
    TominqueBo_VZW
    Follow us on Twitter @VZWSupport

  • URLs end with "#" is that a problem?

    I use some PHP includes in my site and I presume that that is the reason why some URLs end with the hash character.  I'm wondering what that's all about and if it's something I need to fix.
    Say someone cut n' pasted a link with the # on the end.  Would that matter?
    Regards
    Martin

    A # at the end of a link would typically reference an anchor on the page (a link that leads somewhere else on the same page).  So a link with a # and nothing after it would essentially link to the top of that page.

  • Transport control program ended with return code 208

    hi all please give me the solution for the transport control program ended with return code 208
    after the request released

    Hi,
    Please check the transport log at OS level. below is the path
    /usr/sap/trans/log.
    You can also check from SAP level. After the transport is import go log button in the STMS_IMPORT tcode  >>> expand all the possible values... you can find the exact reason why the transport ended with error.
    And also plesae check if nay entry exits in TRBAT table .
    Thanks,
    Phani.

  • [svn:bz-trunk] 5137: Fix failing security tests on BlazeDS/ trunk by using a remote object to invalidate the FlexSession at the end of each test method which should cause each test method to run with a new /clean session.

    Revision: 5137
    Author: [email protected]
    Date: 2009-03-02 10:28:59 -0800 (Mon, 02 Mar 2009)
    Log Message:
    Fix failing security tests on BlazeDS/trunk by using a remote object to invalidate the FlexSession at the end of each test method which should cause each test method to run with a new/clean session. It looks like some test methods were leaving some things in a bad state which was causing the next test that ran to fail. These may be legitimate bugs/issues so we should investigate further to see what sequence of events gets things into a bad state but for these tests we want all of the test methods to run in isolation.
    Modified Paths:
    blazeds/trunk/qa/apps/qa-manual/WEB-INF/flex/services-config.mods.xml
    blazeds/trunk/qa/apps/qa-regress/WEB-INF/flex/remoting-config.mods.xml
    blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/security/stream ing-amf/JMSAuthSendSubscribeConstraintTest.mxml
    blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/security/stream ing-amf/MessagingAuthProSendTest.mxml
    blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/security/stream ing-http/JMSAuthSendSubscribeConstraintTest.mxml
    blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/messagingService/security/stream ing-http/MessagingAuthProSendTest.mxml
    Added Paths:
    blazeds/trunk/qa/apps/qa-regress/WEB-INF/src/qa/messaging/SessionManager.java

    In general theory, one now has the Edit button for their posts, until someone/anyone Replies to it. I've had Edit available for weeks, as opposed to the old forum's ~ 30 mins.
    That, however, is in theory. I've posted, and immediately seen something that needed editing, only to find NO Replies, yet the Edit button is no longer available, only seconds later. Still, in that same thread, I'd have the Edit button from older posts, to which there had also been no Replies even after several days/weeks. Found one that had to be over a month old, and Edit was still there.
    Do not know the why/how of this behavior. At first, I thought that maybe there WAS a Reply, that "ate" my Edit button, but had not Refreshed on my screen. Refresh still showed no Replies, just no Edit either. In those cases, I just Reply and mention the [Edit].
    Also, it seems that the buttons get very scrambled at times, and Refresh does not always clear that up. I end up clicking where I "think" the right button should be and hope for the best. Seems that when the buttons do bunch up they can appear at random around the page, often three atop one another, and maybe one way the heck out in left-field.
    While I'm on a role, it would be nice to be able to switch between Flattened and Threaded Views on the fly. Each has a use, and having to go to Options and then come back down to the thread is a very slow process. Jive is probably incapable of this, but I can dream.
    Hunt

  • HT1212 I have no idea why suddenly my iPhone5 will not move past the Password screen; also, a voice describes each button I touch, and ends with "screen locked" (not "phone locked").

    I have no idea why my iPhone5 suddenly will not move past the PW screen; a "voice" identifies each button touched (the Slide button, for example) or the PW buttons, and then ends with "screen locked" (not phone locked).

    I believe you have Voice Over on:
    You have to tap, then double-tap to select the numbers to enter your passcode.
    Then:
    Press Home.
    Tap Settings. Then double-tap Settings.
    Tap General. Then double-tap General.
    Use three fingers on the screen to scroll to Accessibility.
    Tap Accessibility. Then double-tap Accessibility.
    Tap VoiceOver. Then double-tap VoiceOver.
    Tap "On" next to VoiceOver. Then double-tap "On" to turn it off.

  • Why Do My iMovie Transitions End With A Flash?

    I'm using iMovie 6.0.3 and every time I use a transition on a video clip (or set of clips), it eitgher begins or ends with a bright flash. I'm new to iMovie and have been struggling with this for three days now and am getting very frustrated. I've checked for updates from Apple using Software Update and it says everything is current.
    Does anyone know why this is happening and how/if it can be fixed?
    MacBook Pro 15" 2.16GHz/2Gb/100Gb   Mac OS X (10.4.8)  

    Hi Stephanie,
    I have had the same experience with transitions in iMovie 6, on occasion, along with experiencing many other problems with the transitions that I won't go into here.
    I tried several things to get rid of the flash and was successful, but used different techniques each time, since solution does not appear consistent.
    Suggestions:
    I assume you've already deleted the transition and tried to apply it again, and that hasn't worked. So:
    Select the photos on either side of the transition, and the transition as well. Slowly scroll through the selected sections and see if you can isolate the flash - then delete that section. No success? Try:
    1. Delete your iMovie trash (inlcuding the bad transition) and save project.
    2. Go to finder and locate the file: com.apple.iMovie.plist - yes, delete this. Don't worry. (When you open iMovie again this play list is re-created.)
    3. Empty your trash.
    4. Open iMovie and try the transition again.
    If that doesn't work:
    Resave your movie under a different name, make sure the new one works, and delete the old one.
    All of these steps have worked for me at one time or another. Good luck.
    Raylene

  • I have ended up with three accounts can they be merged to one

    I have ended up with three Apple accounts !!!!
    This is causing me nightmares , is it possible to have them merged into one ? And how?
    Many thanks

    At the present time Apple will not merge accounts (I have 3 myself).  The best thing to do is choose one for all your future purchasing.

  • When I upload new music onto my iPhone 5 it causes existing music to no longer be playable and a circle with an exclamation mark to appear next to it. Or that it won't upload at all, the song is in grey with a dotted circle. Why is that?

    When I manually upload new music onto my iPhone 5 it causes existing music to no longer be playable and a circle with an exclamation mark to appear next to it. Or that it won't upload at all, the song is in grey with a dotted circle next to it. This is incredibly frustrating; especially as I have 1.9GB free on my phone.. why is that?

    Try this procedure; it has worked for many people.
    Un-sync all your music to remove it from the device, then restart (hold down the home button along with the sleep/wake button until you see the apple, then let go). Now re-sync your music.

  • Can I turn off the iMessage typing indicator bubble with the three dots off?

    I currently use software on iOS 6 that disables my outgoing bubble with the three dots that lets whoever I'm communicating with know that I'm typing. I want to update to iOS 7, but can't find any information about whether the option to disable the indicator is present in the new settings. Thanks in advance to anyone who can't point me in the right direction.

    dr.klm wrote:
    I don't see any "typing" in iOS 7.
    You only see them if someone is iMessaging you. You won't see them for SMS. They've been there since iMessages was released.

  • Why GenericServlet has init() with no arg method?

    1)why GenericServlet has init() with no arg method also?.......when do we need this method, is there any such scenario?
    2) why subclass of HttpServlet must override at least one DoXXX method and why we don't override service method? how does the server via "public service" method recognize to call the corresponding doXXX method like for get request call doGet() ?
    Thanks in advance
    Rahul

    1) the javadocs explain exactly what the use of this method is. It's nothing more than a convenience method.
    2) Technically you can override service() and ignore doGet() and doPost(). But that's just bad design, for all you know the service() method does more then just calling doGet() and doPost(). Do what the javadocs tell you, and they tell you to implement doGet() and/or doPost().
    how does the server via "public service" method recognize to call the corresponding doXXX method like for get request call doGet()The answer is already in your question! The service() method checks the request method (get/post/put) and then calls the corresponding method in HttpServlet :s You can check this yourself, call HttpServletRequest.getMethod().

Maybe you are looking for

  • Automatic Payment for recurring invoices

    We have a contract setup to pay 900 vendors once in year from 1/1/2012 to 1/1/2016.I have to set up automatic payment which automatically pays the vendor on 1st of every year from 2012-2016,same amount.The payment is made through checks  as we are ta

  • What is the use of these filters in atg

    Hi Guys, In my web.xml file i have code like this <filter>         <filter-name>PageFilter</filter-name>         <filter-class>atg.filter.dspjsp.PageFilter</filter-class>     </filter>     <filter>         <filter-name>ForwardFilter</filter-name>    

  • How to recovery HD Document submenu

    Hey, I recently had my logic board replaced and since then decided to backup all my info...again. I was in the process of copying my documents to a DVD to burn. However, the way I went about it, did not work. When I opened the HD icon, and the next w

  • Register For Accenture Oracle Summit 2006 Hyderabad

    The 2006 Accenture Shaping the Future Forum Learning sessions for technology professionals on Oracle applications Saturday, March 18, 2006 9.00 am to 3.30 pm Taj Banjara, Hyderabad In research efforts spanning several years, Accenture has sought to i

  • Help: Forte on Windows, cant find javax packages

    Forte integration was working fine for me yesterday, and after uninstalling and re-installing (to fix another problem), I now get the following error: Test/TestApp.java [9:1] package javax.microedition.midlet does not exist import javax.microedition.