Tabnine Logo
HibernateTemplate.saveOrUpdate
Code IndexAdd Tabnine to your IDE (free)

How to use
saveOrUpdate
method
in
org.springframework.orm.hibernate5.HibernateTemplate

Best Java code snippets using org.springframework.orm.hibernate5.HibernateTemplate.saveOrUpdate (Showing top 3 results out of 315)

origin: wanliyang1990/AppServiceRestFul

public void saveOrUpdageToken(TokenBean tokenBean) {
  this.getHibernateTemplate().saveOrUpdate(tokenBean);
}
origin: spring-projects/spring-ldap

public void update(OrgPerson person) {
  String dn = prepareDn(person);
  DirContextAdapter ctx = (DirContextAdapter) ldapTemplate.lookup(dn);
  ctx.setAttributeValue("sn", person.getLastname());
  ctx.setAttributeValue("description", person.getDescription());
  ldapTemplate.modifyAttributes(ctx);
  this.getHibernateTemplate().saveOrUpdate(person);
}
origin: spring-projects/spring-ldap

public void create(OrgPerson person) {
  DistinguishedName dn = new DistinguishedName();
  dn.add("ou", person.getCountry());
  dn.add("ou", person.getCompany());
  dn.add("cn", person.getFullname());
  DirContextAdapter ctx = new DirContextAdapter();
  ctx.setAttributeValues("objectclass", new String[] { "top", "person" });
  ctx.setAttributeValue("cn", person.getFullname());
  ctx.setAttributeValue("sn", person.getLastname());
  ctx.setAttributeValue("description", person.getDescription());
  ldapTemplate.bind(dn, ctx, null);
  this.getHibernateTemplate().saveOrUpdate(person);
}
org.springframework.orm.hibernate5HibernateTemplatesaveOrUpdate

Popular methods of HibernateTemplate

  • delete
  • save
  • <init>
    Create a new HibernateTemplate instance.
  • find
  • get
  • load
  • update
  • getSessionFactory
    Return the Hibernate SessionFactory that should be used to create Hibernate Sessions.
  • executeWithNativeSession
    Execute the action specified by the given action object within a native Session. This execute varian
  • findByNamedParam
  • merge
  • afterPropertiesSet
  • merge,
  • afterPropertiesSet,
  • createSessionProxy,
  • disableFilters,
  • doExecute,
  • enableFilters,
  • findByCriteria,
  • findByNamedQueryAndNamedParam,
  • getFilterNames,
  • isCheckWriteOperations

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • addToBackStack (FragmentTransaction)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now