working on it ...

Filters

Explore Public Snippets

Sort by

Found 11k snippets matching: manager

    public by MarcoDeMagistris  19993  74  6  -1

    Java: How to create a log4j Logger Manager using Singleton

    How to create a log4j Logger Manager using Singleton
    /**
    * LoggerManager class
    * This class implements log4j using Singleton
    */
    import org.apache.log4j.Logger;
    import org.apache.log4j.xml.DOMConfigurator;
    
    public class LoggerManager {
    	public enum LogLevel {DEBUG, INFO, WARNING, ERROR, FATAL};
    	private static LoggerManager obj;
    	private Logger oLog;
    	
    	private LoggerManager(){
    		/*
    		* Config.xml: file path used to configure log4j
    		*/
    		DOMConfigurator.configure("Config.xml");
    	}
    	
    	public LoggerManager(Logger logger) {
    		this();
    		setLogger(logger);
    	}
    
    	private void setLogger(Logger _oLog)
    	{
    		oLog = _oLog;
    	}
    	
    	public static LoggerManager getLogger(){
    		if (obj == null)
    			obj = new LoggerManager(Logger.getLogger(LoggerManager.class));
    		
    		return obj;
    	}
    	
    	public void Log(String _sMsg, LoggerManager.LogLevel _eLogLevel){
    		switch(_eLogLevel){
    			case DEBUG:
    				oLog.debug(_sMsg);
    				break;
    			case INFO:
    				oLog.info(_sMsg);
    				break;
    			case WARNING:
    				oLog.warn(_sMsg);
    				break;
    			case ERROR:
    				oLog.error(_sMsg);
    				break;
    			case FATAL:
    				oLog.fatal(_sMsg);
    				break;
    			default:
    				
    		}
    	}
    }
    
    /**
    * Main class
    * ex. Logger Manager example
    */
    public class Main {
    
    	public static void main(String[] args) {
    		LoggerManager.getLogger().Log("Starting Main", LoggerManager.LogLevel.INFO);
    	}
    
    }

    public by Geometry  1039  1  5  0

    Create application user manager

    Create application user manager
    using System.Threading.Tasks;
    using Microsoft.AspNet.Identity;
    using Microsoft.AspNet.Identity.EntityFramework;
    using Microsoft.AspNet.Identity.Owin;
    using Microsoft.Owin;
    using PowerBIRestDemo.Models;
    
    public static ApplicationUserManager Create(IdentityFactoryOptions<ApplicationUserManager> options, IOwinContext context)
    {
        var manager = new ApplicationUserManager(new UserStore<ApplicationUser>(context.Get<ApplicationDbContext>()));
        // Configure validation logic for usernames
        manager.UserValidator = new UserValidator<ApplicationUser>(manager)
        {
            AllowOnlyAlphanumericUserNames = false,
            RequireUniqueEmail = true
        };
        // Configure validation logic for passwords
        manager.PasswordValidator = new PasswordValidator
        {
            RequiredLength = 6,
            RequireNonLetterOrDigit = true,
            RequireDigit = true,
            RequireLowercase = true,
            RequireUppercase = true,
        };
        var dataProtectionProvider = options.DataProtectionProvider;
        if (dataProtectionProvider != null)
        {
            manager.UserTokenProvider = new DataProtectorTokenProvider<ApplicationUser>(dataProtectionProvider.Create("ASP.NET Identity"));
        }
        return manager;
    }

    public by kulgan  2819  0  5  0

    Freemarker email template manager

    An annotated class showing basic intialization and usage of FreeMarker Template
    package com.sf.birtmanager.email;
    
    import java.io.File;
    import java.io.IOException;
    import java.io.StringWriter;
    import java.util.Map;
    
    import javax.annotation.PostConstruct;
    import javax.ejb.Singleton;
    import freemarker.template.Configuration;
    import freemarker.template.DefaultObjectWrapper;
    import freemarker.template.Template;
    import freemarker.template.TemplateException;
    
    import nw.commons.NeemClazz;
    
    @Singleton
    public class EmailTemplate extends NeemClazz {
    
    	private String templateLocation = "/com/sf/birtmanager/ftl";
    
    	private Configuration cfg;
    
    	@PostConstruct
        public void init() {
            try {
                cfg = new Configuration();
                cfg.setObjectWrapper(new DefaultObjectWrapper());
                cfg.setDirectoryForTemplateLoading(new File(this.getClass().getResource(templateLocation).getFile()));
            } catch (IOException e) {
                logger.error("Exception ", e);
            }
        }
    
    	public StringWriter transform(Map<String, Object> templateModel, String templateFileName) throws IOException, TemplateException{
            addDefaults(templateModel);
            Template tm = cfg.getTemplate(templateFileName);
            StringWriter sw = new StringWriter();
            tm.process(templateModel, sw);
            return sw;
        }
    
    	private void addDefaults(Map<String, Object> templateModel){
    		String dis = "This is an automated email, please do not reply this email.All enquiries should be forwarded to airtelkyc@seamfix.com or visit the portal";
    		templateModel.put("siteURL", appProps.getProperty("site.url", "http://localhost:8080"));
    		templateModel.put("siteName", appProps.getProperty("site.name", "BIRT Manager"));
    		templateModel.put("siteDisclaimer", appProps.getProperty("site.disclaimer", dis));
    	}
    
    }
    

    public by huanshuai  2737  0  5  0

    Flask Manager

    #!/usr/bin/env python
    import pprint
     
    from flask import Flask, current_app
    from flask_script import Manager, prompt_choices, Server
    from main import app
     
    manager = Manager(app)
     
    if __name__ == "__main__":
        manager.run()
    

    public by BrentHoover  1971  0  4  0

    Calling context manager that changes settings while running tests

    Calling context manager that changes settings while running tests: test_settings_context.py
    with self.settings(LOGIN_URL='/other/login/'):
    
    

    public by angelangel  1747  2  6  0

    Race Team Manager Hack Cheats Android iOS

    Download Race Team Manager Hack Cheats Android iOS from Below Link
    Race Team Manager hack tool cheats Android iOS:
    
    DOWNLOAD -> http://bit.ly/raceteamhack
    
    DOWNLOAD -> http://bit.ly/raceteamhack
    
    DOWNLOAD -> http://bit.ly/raceteamhack
    
    
    Probably you are looking for free Cash & Gold in Race Team Manager game. You need a hack tool to do that.Don’t worry you are at the right place. We got Race Team Manager hack tool that can add Unlimited amount of Cash & Gold to the game.Hack is compatible with both android and iOS devices, so whichever phone you are playing this game, hack works on it.No jailbreak needed to use this hack.We have included a additional layer of security to your game account by adding proxy support. You can use private proxies or harvest public ones and use with the hack.
    
    Race Team Manager hack tool is also tested working on Mac, windows and linux os. No need to spend your parents money anymore on buying those in app purchases. You can get all those extra items for free now.Using this Race Team Manager hack tool is very simple and you can always refer to the guide that comes with the download if you have any doubts. You can also contact us by commenting below.We are ready to help.Enjoy playing Race Team Manager with unlimited Cash & Gold.
    
     
    
    Race Team Manager hack tool Features:
    
    Add unlimited Cash & Gold
    Unlock all cars
    Working on Android iOS
    No Root or Jailbreak required for your device.
    Auto Updated and Undetectable
    100% Safe and easy to use!
    
    
    
    
    
    
    
    
    
    
    Tags:
     Race Team Manager hack
     Race Team Manager hack tool
     Race Team Manager hack apk
     Race Team Manager hack no survey
     Race Team Manager hack iphone
     Race Team Manager hack tool no survey
     Race Team Manager hack ifunbox
     Race Team Manager hack download
     Race Team Manager hack ios
     Race Team Manager hack tool v2.99
     Race Team Manager hack tool
     Race Team Manager hack apk
     Race Team Manager hack no survey
     Race Team Manager hack iphone
     Race Team Manager hack tool no survey
     Race Team Manager hack ifunbox
     Race Team Manager hack download
     Race Team Manager hack ios
     Race Team Manager hack tool v2.99
     Race Team Manager hack android
     Race Team Manager hack apk
     Race Team Manager hack android
     Race Team Manager hack apk free download
     Race Team Manager hack apk download
     Race Team Manager hack android download
     Race Team Manager app hack
     Race Team Manager apk hack unlimited coin
     Race Team Manager hack tool apk
     Race Team Manager money hack apk
     Race Team Manager money hack android
     Race Team Manager bichinho virtual hack
     Race Team Manager hack baixar
    baixar  Race Team Manager hack apk
     Race Team Manager hack coin
     Race Team Manager cheat hack
     Race Team Manager apk hack unlimited coin
    cara hack  Race Team Manager
     Race Team Manager hack unlimited coins
     Race Team Manager coin hack apk
     Race Team Manager hack download
     Race Team Manager hack download apk
     Race Team Manager hack tool download
     Race Team Manager hack free download
     Race Team Manager hack apk free download
     Race Team Manager hack android download
    download game  Race Team Manager hack
    descargar  Race Team Manager hack apk
    download  Race Team Manager hack tool v2.99
    descargar  Race Team Manager hack
     Race Team Manager hack free download
     Race Team Manager hack for iphone
     Race Team Manager hack for android
     Race Team Manager hack apk free download
    hack for  Race Team Manager
    download  Race Team Manager hack for android
     Race Team Manager game hack
     Race Team Manager mod 1.9.3 hack games
    download game  Race Team Manager hack
     Race Team Manager hack iphone
     Race Team Manager hack ifunbox
     Race Team Manager hack using ifunbox
    hack  Race Team Manager ipad
     Race Team Manager hack no jailbreak
     Race Team Manager level hack
     Race Team Manager hack money
     Race Team Manager money hack apk
     Race Team Manager money hack android
     Race Team Manager mod 1.9.3 hack games
     Race Team Manager mascota virtual hack
     Race Team Manager hack no survey
     Race Team Manager hack no jailbreak
     Race Team Manager hack tool no survey
     Race Team Manager virtual pet hack
     Race Team Manager virtual pet hack apk
    hack para  Race Team Manager
     Race Team Manager hack para android
     Race Team Manager hack no survey
     Race Team Manager hack tool no survey
    somos android  Race Team Manager hack
     Race Team Manager hack tool
     Race Team Manager hack tool no survey
     Race Team Manager hack tool v2.99
     Race Team Manager hack tool apk
    download  Race Team Manager hack tool v2.99
     Race Team Manager hack unlimited coins
     Race Team Manager hack using ifunbox
     Race Team Manager apk hack unlimited coin
     Race Team Manager hack tool v2.99
    hack  Race Team Manager virtual pet
     Race Team Manager virtual pet hack apk
     Race Team Manager bichinho virtual hack
    download  Race Team Manager hack tool v2.99
     Race Team Manager mascota virtual hack
    hack  Race Team Manager with ifunbox
    how to hack  Race Team Manager without root
     Race Team Manager mod 1.9.3 hack games
     Race Team Manager hack 1.8.2
     Race Team Manager hack 1.9.5
     Race Team Manager hack 1.9.3
     Race Team Manager hack apk 1.9.3
     Race Team Manager cheats
     Race Team Manager cheats money
     Race Team Manager cheats ios
     Race Team Manager cheats for android
     Race Team Manager cheats ipad
     Race Team Manager cheats apk
     Race Team Manager cheats money
     Race Team Manager cheats ios
     Race Team Manager cheats ipod
     Race Team Manager cheats for android
     Race Team Manager cheats ipad
     Race Team Manager cheats apk
     Race Team Manager cheats android
     Race Team Manager cheats apk
     Race Team Manager cheats and hints
     Race Team Manager cheats and tricks
     Race Team Manager cheat app
    free download  Race Team Manager cheat apk
     Race Team Manager cheat kit for android and ios
     Race Team Manager cheats coins
     Race Team Manager cheat codes
     Race Team Manager cheats download
     Race Team Manager cheats free download
     Race Team Manager cheat kit download
     Race Team Manager cheat kit free download
     Race Team Manager cheat apk download
     Race Team Manager cheats deutsch
     Race Team Manager cheats for iphone
     Race Team Manager cheats for android
     Race Team Manager cheats free download
     Race Team Manager cheat kit free download
     Race Team Manager cheat kit for android and ios
    download  Race Team Manager cheat for android
    cheats für  Race Team Manager
     Race Team Manager game cheats
     Race Team Manager game money cheats
     Race Team Manager geld cheat
     Race Team Manager cheat hack
     Race Team Manager cheats and hints
     Race Team Manager cheats ios
     Race Team Manager cheats ipod
     Race Team Manager cheat ifunbox
     Race Team Manager cheats kit
     Race Team Manager cheat kit download
     Race Team Manager cheat kit free download
     Race Team Manager cheat kit for android and ios
     Race Team Manager cheat level
     Race Team Manager level up cheats
     Race Team Manager cheats money
     Race Team Manager game money cheats
     Race Team Manager virtual pet cheats
    cheats para  Race Team Manager
    
    

    public by AnghelLeonard  1484  0  5  0

    EntityManager joining a JTA transaction

    EntityManager joining a JTA transaction
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("foo_PU");
    EntityManager em = emf.createEntityManager();
    
    // specific to JBossStandAloneJtaPlatform
    javax.transaction.TransactionManager tx = 
                    com.arjuna.ats.jta.TransactionManager.transactionManager();        
    // or
    javax.transaction.UserTransaction tx_ = 
                    com.arjuna.ats.jta.UserTransaction.userTransaction();
    
    try {
        tx.begin();
        em.joinTransaction();
        em.persist(transientInstance);
        tx.commit();
        ...

    public by Quentin PANISSIER  949  0  3  0

    Prelude Manager - Script init.d

    Prelude Manager - Script init.d: prelude-manager
    #!/bin/sh
    #
    # init.d script for prelude-manager with LSB support.
    #
    # Copyright (c) 2008 Pierre Chifflier <pollux@debian.org>
    #
    # This is free software; you may redistribute it and/or modify
    # it under the terms of the GNU General Public License as
    # published by the Free Software Foundation; either version 2,
    # or (at your option) any later version.
    #
    # This is distributed in the hope that it will be useful, but
    # WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License with
    # the Debian operating system, in /usr/share/common-licenses/GPL;  if
    # not, write to the Free Software Foundation, Inc., 59 Temple Place,
    # Suite 330, Boston, MA 02111-1307 USA
    #
    ### BEGIN INIT INFO
    # Provides:          prelude-manager
    # Required-Start:    $network $local_fs $remote_fs $syslog
    # Required-Stop:     $remote_fs
    # Should-Start:      $named
    # Should-Stop:
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Collect, store and report events from Prelude agents
    ### END INIT INFO
    
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    
    DAEMON=/usr/local/bin/prelude-manager  # Introduce the server's location here
    NAME=prelude-manager                   # Introduce the short server's name here
    DESC=prelude-manager                   # Introduce a short description here
    LOGDIR=/var/log/prelude-manager        # Log directory to use
    
    PIDFILE=/var/run/$NAME.pid
    
    test -x $DAEMON || exit 0
    
    . /lib/lsb/init-functions
    
    # Default options, these can be overriden by the information
    # at /etc/default/$NAME
    DAEMON_OPTS="-d -P $PIDFILE"          # Additional options given to the server
    
    DIETIME=3               # Time to wait for the server to die, in seconds
                            # If this value is set too low you might not
                            # let some servers to die gracefully and
                            # 'restart' will not work
    
    #STARTTIME=2             # Time to wait for the server to start, in seconds
                            # If this value is set each time the server is
                            # started (on start or restart) the script will
                            # stall to try to determine if it is running
                            # If it is not set and the server takes time
                            # to setup a pid file the log message might 
                            # be a false positive (says it did not start
                            # when it actually did)
                            
    LOGFILE=$LOGDIR/$NAME.log  # Server logfile
    #DAEMONUSER=prelude     # Users to run the daemons as. If this value
                            # is set start-stop-daemon will chuid the server
    
    # Include defaults if available
    if [ -f /etc/default/$NAME ] ; then
            . /etc/default/$NAME
    fi
    
    # Check that the user exists (if we set a user)
    # Does the user exist?
    if [ -n "$DAEMONUSER" ] ; then
        if getent passwd | grep -q "^$DAEMONUSER:"; then
            # Obtain the uid and gid
            DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'`
            DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'`
        else
            log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist."
            exit 1
        fi
    fi
    
    
    set -e
    
    running_pid() {
    # Check if a given process pid's cmdline matches a given name
        pid=$1
        name=$2
        [ -z "$pid" ] && return 1
        [ ! -d /proc/$pid ] &&  return 1
        cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
        # Is this the expected server
        [ "$cmd" != "$name" ] &&  return 1
        return 0
    }
    
    running() {
    # Check if the process is running looking at /proc
    # (works for all users)
    
        # No pidfile, probably no daemon present
        [ ! -f "$PIDFILE" ] && return 1
        pid=`cat $PIDFILE`
        running_pid $pid $DAEMON || return 1
        return 0
    }
    
    start_server() {
            if [ ! -d "/var/run/prelude-manager" ] ; then
                mkdir /var/run/prelude-manager
            fi
    # Start the process using the wrapper
            if [ -z "$DAEMONUSER" ] ; then
                start_daemon -p $PIDFILE $DAEMON $DAEMON_OPTS
                errcode=$?
            else
    # if we are using a daemonuser then change the user id
                touch $PIDFILE
                chown $DAEMONUSER $PIDFILE
                chown $DAEMONUSER /var/run/prelude-manager
                start-stop-daemon --start --quiet --pidfile $PIDFILE \
                            --chuid $DAEMONUSER \
                            --exec $DAEMON -- $DAEMON_OPTS
                errcode=$?
            fi
            return $errcode
    }
    
    stop_server() {
    # Stop the process using the wrapper
            if [ -z "$DAEMONUSER" ] ; then
                killproc -p $PIDFILE $DAEMON
                errcode=$?
            else
    # if we are using a daemonuser then look for process that match
                start-stop-daemon --stop --quiet --pidfile $PIDFILE \
                            --user $DAEMONUSER \
                            --exec $DAEMON
                errcode=$?
            fi
    
            return $errcode
    }
    
    reload_server() {
        [ ! -f "$PIDFILE" ] && return 1
        pid=pidofproc $PIDFILE # This is the daemon's pid
        # Send a SIGHUP
        kill -1 $pid
        return $?
    }
    
    force_stop() {
    # Force the process to die killing it manually
            [ ! -e "$PIDFILE" ] && return
            if running ; then
                    kill -15 $pid
            # Is it really dead?
                    sleep "$DIETIME"s
                    if running ; then
                            kill -9 $pid
                            sleep "$DIETIME"s
                            if running ; then
                                    echo "Cannot kill $NAME (pid=$pid)!"
                                    exit 1
                            fi
                    fi
            fi
            rm -f $PIDFILE
    }
    
    
    case "$1" in
      start)
            log_daemon_msg "Starting $DESC " "$NAME"
            # Check if it's running first
            if running ;  then
                log_progress_msg "apparently already running"
                log_end_msg 0
                exit 0
            fi
            if start_server ; then
                # NOTE: Some servers might die some time after they start,
                # this code will detect this issue if STARTTIME is set
                # to a reasonable value
                [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time 
                if  running ;  then
                    # It's ok, the server started and is running
                    log_end_msg 0
                else
                    # It is not running after we did start
                    log_end_msg 1
                fi
            else
                # Either we could not start it
                log_end_msg 1
            fi
            ;;
      stop)
            log_daemon_msg "Stopping $DESC" "$NAME"
            if running ; then
                # Only stop the server if we see it running
                            errcode=0
                stop_server || errcode=$?
                log_end_msg $errcode
            else
                # If it's not running don't do anything
                log_progress_msg "apparently not running"
                log_end_msg 0
                exit 0
            fi
            ;;
      force-stop)
            # First try to stop gracefully the program
            $0 stop
            if running; then
                # If it's still running try to kill it more forcefully
                log_daemon_msg "Stopping (force) $DESC" "$NAME"
                            errcode=0
                force_stop || errcode=$?
                log_end_msg $errcode
            fi
            ;;
      restart|force-reload)
            log_daemon_msg "Restarting $DESC" "$NAME"
                    errcode=0
            stop_server || errcode=$?
            # Wait some sensible amount, some server need this
            [ -n "$DIETIME" ] && sleep $DIETIME
            start_server || errcode=$?
            [ -n "$STARTTIME" ] && sleep $STARTTIME
            running || errcode=$?
            log_end_msg $errcode
            ;;
      status)
    
            log_daemon_msg "Checking status of $DESC" "$NAME"
            if running ;  then
                log_progress_msg "running"
                log_end_msg 0
            else
                log_progress_msg "apparently not running"
                log_end_msg 1
                exit 1
            fi
            ;;
      # Use this if the daemon cannot reload
      #reload)
            # log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon"
            # log_warning_msg "cannot re-read the config file (use restart)."
            # ;;
      # And this if it cann
      reload)
            #
            # If the daemon can reload its config files on the fly
            # for example by sending it SIGHUP, do it here.
            #
            # If the daemon responds to changes in its config file
            # directly anyway, make this a do-nothing entry.
            #
            log_daemon_msg "Reloading $DESC configuration files" "$NAME"
            if running ; then
               reload_server
               if ! running ;  then
              # Process died after we tried to reload
                  log_progress_msg "died on reload"
                  log_end_msg 1
                  exit 1
               fi
            else
               log_progress_msg "server is not running"
               log_end_msg 1
               exit 1
            fi
                                                                                            ;;
    
      *)
            N=/etc/init.d/$NAME
            echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2
            exit 1
            ;;
    esac
    
    exit 0
    
    

    public by Magesolution  798  0  5  0

    Advanced Content Manager Magento 2 extension

    Advanced Content Manager Magento 2 extension by MGS assists administrator to create a variety of content types, eg. portfolio, testimonial, gallery, news, lookbook... and many other custom forms at light speed but effortlessly at the same time. This content builder is also a breakthrough in Magento 2 extension development owing to its uniqueness an
    https://www.magesolution.com/advanced-content-manager.html				

    public by lbottaro  1827  0  6  1

    How to persist java class - JPA PersonManager

    This class manage the data entity Person using java JPA framework. The annotation PersistenceContext will set the Persistence Unit name for the EntityManager. The name must match the one set in persistence.xml. This manager can persist, delete, find and search Person entity.
    package com.test.example.person.manager;
    
    import java.util.Collection;
    import java.util.List;
    
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.persistence.TypedQuery;
    
    import com.test.example.interfaces.IPerson;
    import com.test.example.person.Person;
    
    public class PersonManager implements IPerson {
    	
        @PersistenceContext(unitName = "PersonWebAppEJB_FinalPU")
        private EntityManager em;
    
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
    
    	}
    
    	@Override
    	public Person getPerson(int id) {
    		return em.find(Person.class, id);
    	}
    
    	@Override
    	public List<Person> getPersonList() {
    		TypedQuery<Person> q = em.createQuery("select p from Person p", Person.class);
            List<Person> personList = q.getResultList();
            return personList;
    	}
    
    	@Override
    	public Person addPerson(Person p) {
    		em.persist(p);
    		return p;
    	}
    
    	@Override
    	public Person updatePerson(Person p) {
    		p = em.merge(p);
            return p;
    	}
    
    	@Override
    	public void deletePerson(int id) {
    		Person p = em.find(Person.class, id);
            em.remove(p);
    		
    	}
    
    	@Override
    	public Collection<Person> searchPersons(String completeName) {
    		String[] nameParts = completeName.split(" ");
    		String firstName = nameParts[0];
    		String lastName = nameParts.length > 1 ? nameParts[1] : "";
    		TypedQuery<Person> q = em
    				.createQuery(
    						"select p from Person p where p.firstName like :firstName and p.lastName like :lastName",
    						Person.class);
    		q.setParameter("firstName", firstName.concat("%"));
    		q.setParameter("lastName", lastName.concat("%"));
    		List<Person> personList = q.getResultList();
    		return personList;
    	}
    
    }
    
    • Public Snippets
    • Channels Snippets