⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 session_api.po

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 PO
📖 第 1 页 / 共 5 页
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: http://bugs.kde.org\n""POT-Creation-Date: 2007-10-25 07:47+0000\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#. Tag: title#: session_api.xml:5#, no-c-formatmsgid "Working with objects"msgstr "객체들로 작업하기"#. Tag: para#: session_api.xml:7#, no-c-formatmsgid """Hibernate is a full object/relational mapping solution that not only shields ""the developer from the details of the underlying database management system, ""but also offers <emphasis>state management</emphasis> of objects. This is, ""contrary to the management of SQL <literal>statements</literal> in common ""JDBC/SQL persistence layers, a very natural object-oriented view of ""persistence in Java applications."msgstr """Hibernate는 기본 데이터베이스 관리 시스템의 상세로부터 개발자들을 은폐시켜줄 ""뿐만 아니라, 또한 객체들에 대한 <emphasis>상태 관리</emphasis>를 제공하는 하""나의 완전한 객체/관계형 매핑 솔루션이다. 이것은 공통적인 JDBC/SQL 영속 계층""들 내에서의 SQL <literal>문장들</literal>에 대한 관리와는 반대로, 자바 어플리""케이션들에서 영속에 관한 매우 고유한 객체-지향적 관점이다."#. Tag: para#: session_api.xml:16#, no-c-formatmsgid """In other words, Hibernate application developers should always think about ""the <emphasis>state</emphasis> of their objects, and not necessarily about ""the execution of SQL statements. This part is taken care of by Hibernate and ""is only relevant for the application developer when tuning the performance ""of the system."msgstr """달리 말해, Hibernate 어플리케이션 개발자들은 그들의 객체들의 <emphasis>상태</""emphasis>에 대해 항상 생각해야 하고, SQL 문장들의 실행에 대해서는 필수적이지 ""않다. 이 부분은 Hibernate에 의해 처리되고 시스템의 퍼포먼스를 튜닝할 때 어플""리케이션 개발자와 유일하게 관련된다."#. Tag: title#: session_api.xml:24#, no-c-formatmsgid "Hibernate object states"msgstr "Hibernate 객체 상태들"#. Tag: para#: session_api.xml:26#, no-c-formatmsgid "Hibernate defines and supports the following object states:"msgstr "Hibernate 다음 객체 상태들을 정의하고 지원한다:"#. Tag: para#: session_api.xml:32#, no-c-formatmsgid """<emphasis>Transient</emphasis> - an object is transient if it has just been ""instantiated using the <literal>new</literal> operator, and it is not ""associated with a Hibernate <literal>Session</literal>. It has no persistent ""representation in the database and no identifier value has been assigned. ""Transient instances will be destroyed by the garbage collector if the ""application doesn't hold a reference anymore. Use the Hibernate ""<literal>Session</literal> to make an object persistent (and let Hibernate ""take care of the SQL statements that need to be executed for this ""transition)."msgstr """<emphasis>Transient</emphasis> - 만일 객체가 <literal>new</literal> 연산자를 ""사용하여 방금 초기화 되었다면 객체는 transient이고, 그것은 Hibernate ""<literal>Session</literal>과 연관되어 있지 않다. 그것은 데이터베이스 내에서 ""영속 표상을 갖지 않고 식별자 값이 할당되지 않았다. 만일 어플리케이션이 더 이""상 참조를 소유하지 않을 경우 transient 인스턴스들은 쓰레기 수집기에 의해 파괴""될 것이다. 객체를 영속화 시키는데 (그리고 이 전이(transition)에 대해 실행될 ""필요가 있는 SQL 문장들을 Hibernate로 하여금 처리하도록 하는데) Hibernate ""<literal>Session</literal>을 사용하라."#. Tag: para#: session_api.xml:44#, no-c-formatmsgid """<emphasis>Persistent</emphasis> - a persistent instance has a representation ""in the database and an identifier value. It might just have been saved or ""loaded, however, it is by definition in the scope of a <literal>Session</""literal>. Hibernate will detect any changes made to an object in persistent ""state and synchronize the state with the database when the unit of work ""completes. Developers don't execute manual <literal>UPDATE</literal> ""statements, or <literal>DELETE</literal> statements when an object should be ""made transient."msgstr """<emphasis>Persistent</emphasis> - 하나의 영속 인스턴스는 데이터베이스 내에서 ""하나의 표상을 갖고 하나의 식별자 값을 갖는다. 그것은 방금 저장되었거나 로드되""었을 수 있지만, 정의상 그것은 <literal>Session</literal>의 범위 내에 있다. ""Hibernate는 영속 상태에서 객체에 대해 행해진 임의의 변경들을 검출해낼 것이고 ""단위 작업이 완료될 때 그 상태를 데이터베이스와 동기화 시킬 것이다. 개발자들""은 하나의 객체가 transient로 되어야 할 때 <literal>UPDATE</literal> 문장들이""나 <literal>DELETE</literal> 문장들을 수작업으로 실행하지 않는다."#. Tag: para#: session_api.xml:55#, no-c-formatmsgid """<emphasis>Detached</emphasis> - a detached instance is an object that has ""been persistent, but its <literal>Session</literal> has been closed. The ""reference to the object is still valid, of course, and the detached instance ""might even be modified in this state. A detached instance can be reattached ""to a new <literal>Session</literal> at a later point in time, making it (and ""all the modifications) persistent again. This feature enables a programming ""model for long running units of work that require user think-time. We call ""them <emphasis>application transactions</emphasis>, i.e. a unit of work from ""the point of view of the user."msgstr """<emphasis>Detached</emphasis> - 하나의 detached 인스턴스는 영속화 되었지만, ""그것의 <literal>Session</literal>이 닫혀진 객체이다. 물론 그 객체에 대한 참조""는 여전히 유효하고, 그 detached 인스턴스는 이 상태에서도 변경될 수도 있다. 하""나의 detached 인스턴스는 나중에 그것(과 모두 변경들)을 다시 영속화 시켜서 새""로운 <literal>Session</literal>에 다시 첨부될 수 있다. 이 특징은 사용자가 생""각할 시간을 필요로 하는 장 기간 실행되는 작업 단위를 위한 프로그래밍 모형을 ""가능하게 해준다. 우리는 그것들을 <emphasis>어플리케이션 트랜잭션들</""emphasis>, 즉 사용자의 관점의 작업 단위라고 부른다."#. Tag: para#: session_api.xml:69#, no-c-formatmsgid """We'll now discuss the states and state transitions (and the Hibernate ""methods that trigger a transition) in more detail."msgstr """이제 우리는 상태들과 상태 전이(transition)들(그리고 전이를 트리거 시키는 ""Hibernate 메소드들)을 상세하게 논의할 것이다."#. Tag: title#: session_api.xml:77#, no-c-formatmsgid "Making objects persistent"msgstr "객체들을 영속화 시키기"#. Tag: para#: session_api.xml:79#, no-c-formatmsgid """Newly instantiated instances of a a persistent class are considered ""<emphasis>transient</emphasis> by Hibernate. We can make a transient ""instance <emphasis>persistent</emphasis> by associating it with a session:"msgstr """하나의 영속 클래스의 새로이 초기화 된 인스턴스들은 Hibernate에 의해 ""<emphasis>transient</emphasis>로 간주된다. 우리는 그것을 세션과 연관지어서 ""transient 인스턴스를 <emphasis>영속화</emphasis> 시킬 수 있다:"#. Tag: programlisting#: session_api.xml:86#, no-c-formatmsgid """<![CDATA[DomesticCat fritz = new DomesticCat();\n""fritz.setColor(Color.GINGER);\n""fritz.setSex('M');\n""fritz.setName(\"Fritz\");\n""Long generatedId = (Long) sess.save(fritz);]]>"msgstr ""#. Tag: para#: session_api.xml:88#, no-c-formatmsgid """If <literal>Cat</literal> has a generated identifier, the identifier is ""generated and assigned to the <literal>cat</literal> when <literal>save()</""literal> is called. If <literal>Cat</literal> has an <literal>assigned</""literal> identifier, or a composite key, the identifier should be assigned ""to the <literal>cat</literal> instance before calling <literal>save()</""literal>. You may also use <literal>persist()</literal> instead of ""<literal>save()</literal>, with the semantics defined in the EJB3 early ""draft."msgstr """만일 <literal>Cat</literal>이 생성된 식별자를 가질 경우, <literal>save()</""literal>가 호출될 때 그 식별자가 생성되고 <literal>cat</literal>에 할당된다. ""만일 <literal>Cat</literal>이 하나의 <literal>assigned</literal> 식별자나 하""나의 composite key를 가질 경우, <literal>save()</literal>를 호출하기 전에 그 ""식별자가<literal>cat</literal> 인스턴스에 할당될 것이다. 당신은 또한 EJB3 초""기 드래프트에서 정의된 의미로 <literal>save()</literal> 대신 <literal>persist""()</literal>를 사용할 수도 있다."#. Tag: para#: session_api.xml:100#, no-c-formatmsgid """<literal>persist()</literal> makes a transient instance persistent. However, ""it doesn't guarantee that the identifier value will be assigned to the ""persistent instance immediately, the assignment might happen at flush time. ""<literal>persist()</literal> also guarantees that it will not execute an ""<literal>INSERT</literal> statement if it is called outside of transaction ""boundaries. This is useful in long-running conversations with an extended ""Session/persistence context."msgstr """UNTRANSLATED! <literal>persist()</literal> makes a transient instance ""persistent. However, it doesn't guarantee that the identifier value will be ""assigned to the persistent instance immediately, the assignment might happen ""at flush time. <literal>persist()</literal> also guarantees that it will not ""execute an <literal>INSERT</literal> statement if it is called outside of ""transaction boundaries. This is useful in long-running conversations with an ""extended Session/persistence context."#. Tag: para#: session_api.xml:111#, no-c-formatmsgid """<literal>save()</literal> does guarantee to return an identifier. If an ""INSERT has to be executed to get the identifier ( e.g. \"identity\" ""generator, not \"sequence\"), this INSERT happens immediately, no matter if ""you are inside or outside of a transaction. This is problematic in a long-""running conversation with an extended Session/persistence context."msgstr """<literal>save()</literal> does guarantee to return an identifier. If an ""INSERT has to be executed to get the identifier ( e.g. \"identity\" ""generator, not \"sequence\"), this INSERT happens immediately, no matter if ""you are inside or outside of a transaction. This is problematic in a long-""running conversation with an extended Session/persistence context."#. Tag: para#: session_api.xml:121#, no-c-formatmsgid """Alternatively, you may assign the identifier using an overloaded version of ""<literal>save()</literal>."msgstr """다른 방법으로, 당신은 <literal>save()</literal>의 오버로드된 버전을 사용하여 ""식별자를 할당할 수 있다."#. Tag: programlisting#: session_api.xml:126#, no-c-formatmsgid """<![CDATA[DomesticCat pk = new DomesticCat();\n""pk.setColor(Color.TABBY);\n""pk.setSex('F');\n""pk.setName(\"PK\");\n""pk.setKittens( new HashSet() );\n""pk.addKitten(fritz);\n""sess.save( pk, new Long(1234) );]]>"msgstr ""#. Tag: para#: session_api.xml:128#, no-c-formatmsgid """If the object you make persistent has associated objects (e.g. the ""<literal>kittens</literal> collection in the previous example), these ""objects may be made persistent in any order you like unless you have a ""<literal>NOT NULL</literal> constraint upon a foreign key column. There is ""never a risk of violating foreign key constraints. However, you might ""violate a <literal>NOT NULL</literal> constraint if you <literal>save()</""literal> the objects in the wrong order."msgstr """만일 당신이 영속화 시키는 객체가 연관된 객체들(예를 들면. 앞의 예제에 있는 ""<literal>kittens</literal> 콜렉션)을 갖고 있다면, 당신이 하나의 foreign 키 컬""럼에 대해 하나의 <literal>NOT NULL</literal> 컨스트레인트를 갖지 않는 한, 이""들 객체들은 당신이 좋아하는 임의의 순서로 영속화 되었을 수도 있다. foreign ""키 컨스트레인트들을 위배하는 위험성이 결코 존재하지 않는다. 하지만 당신이 잘""못된 순서로 그 객체들을 <literal>save()</literal> 시킬 경우 당신은 ""<literal>NOT NULL</literal> 컨스트레인트를 위배할 수도 있다."#. Tag: para#: session_api.xml:138#, no-c-formatmsgid """Usually you don't bother with this detail, as you'll very likely use ""Hibernate's <emphasis>transitive persistence</emphasis> feature to save the ""associated objects automatically. Then, even <literal>NOT NULL</literal> ""constraint violations don't occur - Hibernate will take care of everything. ""Transitive persistence is discussed later in this chapter."msgstr """당신이 연관된 객체들을 자동적으로 저장시키는데 Hibernate의 ""<emphasis>transitive persistence(전이 영속)</emphasis> 특징을 사용하는 것을 ""매우 좋아할 것이므로 대개 당신은 이 상세를 내버려둔다. 그때 <literal>NOT ""NULL</literal> 컨스트레인트 위배들이 발생되지 않을지라도 - Hibernate는 모든 ""것을 처리할 것이다. Transitive persistence(전이 영속)은 이 장에서 후반부에서 ""논의된다."#. Tag: title#: session_api.xml:149#, no-c-formatmsgid "Loading an object"msgstr "객체를 로드시키기"#. Tag: para#: session_api.xml:151#, no-c-formatmsgid """The <literal>load()</literal> methods of <literal>Session</literal> gives ""you a way to retrieve a persistent instance if you already know its ""identifier. <literal>load()</literal> takes a class object and will load the ""state into a newly instantiated instance of that class, in persistent state."msgstr """<literal>Session</literal>의 <literal>load()</literal> 메소드들은 만일 당신""이 그것(영속 인스턴스)의 식별자들을 이미 알고 있을 경우에 영속 인스턴스를 검""색하는 방법을 당신에게 제공한다. <literal>load()</literal>는 하나의 클래스 객""체를 취하고 그 상태를 영속(persistent) 상태로 그 클래스의 새로이 초기화 된 인""스턴스 속으로 로드시킬 것이다."#. Tag: programlisting#: session_api.xml:158#, no-c-formatmsgid "<![CDATA[Cat fritz = (Cat) sess.load(Cat.class, generatedId);]]>"msgstr ""#. Tag: programlisting#: session_api.xml:160#, no-c-formatmsgid """<![CDATA[// you need to wrap primitive identifiers\n""long id = 1234;\n""DomesticCat pk = (DomesticCat) sess.load( DomesticCat.class, new Long"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -