Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the methods of Hibernate status

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the methods of Hibernate status, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

BooleanisConnected ()

Check to see if the current Session is connected. BooleanisDirty ()

Does the current Session contain changes that need to be synchronized with the database? If we refresh the submission (flush), will the session be executed by SQL? BooleanisOpen ()

Check to see if the current Session is still open. Objectload (Class theClass, Serializable id)

If a qualified instance exists, the instance of the persistent state is returned according to the given entity class and identity. Objectload (Class theClass, Serializable id, LockMode lockMode)

If a qualified instance exists, the instance of the persistent state is returned according to the given entity class, identity, and specified locking level. Voidload (Object object, Serializable id)

Copies the persistence state (value) corresponding to the given flag to the given free state (trasient) instance. Objectload (String entityName, Serializable id)

If a qualified instance exists, the instance of the persistent state is returned according to the given entity class and identity. Objectload (String entityName, Serializable id, LockMode lockMode)

If a qualified instance exists, the instance of the persistent state is returned according to the given entity class, identity, and specified locking level. Voidlock (Object object, LockMode lockMode)

Gets the specified locking level from the given object. Voidlock (String entityName, Object object, LockMode lockMode)

Gets the specified locking level from the given object. Objectmerge (Object object)

Copies the state of the given object to a persistent object with the same identity. Objectmerge (String entityName, Object object)

Copies the state of the given object to a persistent object with the same identity. Voidpersist (Object object)

Persist an instance of a free state (transient). Voidpersist (String entityName, Object object)

Persist an instance of a free state (transient).

Voidreconnect (Connection connection)

Reconnect to the given JDBC connection. Voidrefresh (Object object)

Reread the status of the given instance from the database. Voidrefresh (Object object, LockMode lockMode)

Reread the state of the given instance from the database based on the specified locking mode (LockMode). Voidreplicate (Object object, ReplicationMode replicationMode)

An entity that persists a given free state (Transient) with the current identity value. Voidreplicate (String entityName, Object object, ReplicationMode replicationMode)

An entity that persists a given free state (Transient) with the current identity value. Serializablesave (Object object)

First, an identity is generated and assigned to an object in a given free state (Transient) (based on configuration), and then it is persisted. Serializablesave (String entityName, Object object)

First, an identity is generated and assigned to an object in a given free state (Transient) (based on configuration), and then it is persisted. VoidsaveOrUpdate (Object object)

Unsaved-value can be specified based on the value of the identity property of the given instance. Generally, the default is null. To decide to perform a save () or update () operation. VoidsaveOrUpdate (String entityName, Object object)

Unsaved-value can be specified based on the value of the identity property of the given instance. Generally, the default is null. To decide to perform a save () or update () operation. VoidsetCacheMode (CacheMode cacheMode)

Sets the refresh submission mode. VoidsetFlushMode (FlushMode flushMode)

Sets the refresh submission mode. VoidsetReadOnly (Object entity, boolean readOnly)

Set an unchanged persistent object to read-only mode, or mark a read-only object as a mode that can be modified. Voidupdate (Object object)

Updates the corresponding persistent instance according to the identity of the given detached (free state) object instance. Voidupdate (String entityName, Object object)

Update the corresponding persistence instance according to the identity of the given detached (free state) object instance. Thank you for reading this article carefully. I hope the article "what are the methods of Hibernate status" shared by the editor will be helpful to you. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report