📄 best_practices.po
字号:
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#: best_practices.xml:5#, no-c-formatmsgid "Best Practices"msgstr "Boas práticas"#. Tag: term#: best_practices.xml:9#, no-c-formatmsgid """Write fine-grained classes and map them using <literal><component></""literal>."msgstr """Escreva classes compactas e mapeie-as usando <literal><component></""literal>."#. Tag: para#: best_practices.xml:11#, no-c-formatmsgid """Use an <literal>Address</literal> class to encapsulate <literal>street</""literal>, <literal>suburb</literal>, <literal>state</literal>, ""<literal>postcode</literal>. This encourages code reuse and simplifies ""refactoring."msgstr """Use uma classe <literal>Endereco</literal> para encapsular <literal>rua</""literal>, <literal>bairro</literal>, <literal>estado</literal>, ""<literal>CEP</literal>. Isto promove a reutilização de código e simplifica o ""refactoring."#. Tag: term#: best_practices.xml:19#, no-c-formatmsgid "Declare identifier properties on persistent classes."msgstr "Declare propriedades identificadoras em classes persistentes."#. Tag: para#: best_practices.xml:21#, no-c-formatmsgid """Hibernate makes identifier properties optional. There are all sorts of ""reasons why you should use them. We recommend that identifiers be ""'synthetic' (generated, with no business meaning)."msgstr """O Hibernate constrói propriedades identificadoras opcionais. Existem todos ""os tipos de razões que explicam porquê você deveria utilizá-las. Nós ""recomendamos que os identificadores sejam 'sintéticos' (gerados, sem ""significado para o negocio)."#. Tag: term#: best_practices.xml:29#, no-c-formatmsgid "Identify natural keys."msgstr "Identifique chaves naturais."#. Tag: para#: best_practices.xml:31#, no-c-formatmsgid """Identify natural keys for all entities, and map them using <literal><""natural-id></literal>. Implement <literal>equals()</literal> and ""<literal>hashCode()</literal> to compare the properties that make up the ""natural key."msgstr """Identifique chaves naturais para todas as entidades, e mapeie-as usando ""<literal><natural-id></literal>. Implemente <literal>equals()</""literal> e <literal>hashCode()</literal> para comparar as propriedades que ""compõem a chave natural."#. Tag: term#: best_practices.xml:39#, no-c-formatmsgid "Place each class mapping in its own file."msgstr "Coloque cada classe de mapeamento em seu próprio arquivo."#. Tag: para#: best_practices.xml:41#, no-c-formatmsgid """Don't use a single monolithic mapping document. Map <literal>com.eg.Foo</""literal> in the file <literal>com/eg/Foo.hbm.xml</literal>. This makes ""particularly good sense in a team environment."msgstr """Não use um único código de mapeamento monolítico. Mapeie <literal>com.eg.""Foo</literal> no arquivo <literal>com/eg/Foo.hbm.xml</literal>. Isto promove ""particularmente o bom senso no time de desenvolvimento."#. Tag: term#: best_practices.xml:49#, no-c-formatmsgid "Load mappings as resources."msgstr "Carregue os mapeamentos como recursos."#. Tag: para#: best_practices.xml:51#, no-c-formatmsgid "Deploy the mappings along with the classes they map."msgstr "Faça o deploy dos mapeamentos junto com as classes que eles mapeiam."#. Tag: term#: best_practices.xml:57#, no-c-formatmsgid "Consider externalising query strings."msgstr "Considere externalizar as strings de consultas."#. Tag: para#: best_practices.xml:59#, no-c-formatmsgid """This is a good practice if your queries call non-ANSI-standard SQL ""functions. Externalising the query strings to mapping files will make the ""application more portable."msgstr """Esta é uma boa prática se suas consultas chamam funções SQL que não sejam ""ANSI. Externalizar as strings de consultas para mapear arquivos irão tornar ""a aplicação mais portável."#. Tag: term#: best_practices.xml:67#, no-c-formatmsgid "Use bind variables."msgstr "Use bind variables."#. Tag: para#: best_practices.xml:69#, no-c-formatmsgid """As in JDBC, always replace non-constant values by \"?\". Never use string ""manipulation to bind a non-constant value in a query! Even better, consider ""using named parameters in queries."msgstr """Assim como em JDBC, sempre substitua valores não constantes por \"?\". Nunca ""use a manipulação de strings para concatenar valores não constantes em uma ""consulta! Até melhor, considere usar parâmetros nomeados nas consultas."#. Tag: term#: best_practices.xml:77#, no-c-formatmsgid "Don't manage your own JDBC connections."msgstr "Não gerencie suas conexões JDBC."#. Tag: para#: best_practices.xml:79#, no-c-formatmsgid """Hibernate lets the application manage JDBC connections. This approach should ""be considered a last-resort. If you can't use the built-in connections ""providers, consider providing your own implementation of <literal>org.""hibernate.connection.ConnectionProvider</literal>."msgstr """O Hibernate permite que a aplicação gerencie conexões JDBC. Esta abordagem ""deve ser considerada um último recurso. Se você não pode usar os provedores ""de conexão embutidos, considere fazer sua implementação a partir de ""<literal>org.hibernate.connection.ConnectionProvider</literal>."#. Tag: term#: best_practices.xml:87#, no-c-formatmsgid "Consider using a custom type."msgstr "Considere usar tipos customizados."#. Tag: para#: best_practices.xml:89#, no-c-formatmsgid """Suppose you have a Java type, say from some library, that needs to be ""persisted but doesn't provide the accessors needed to map it as a component. ""You should consider implementing <literal>org.hibernate.UserType</literal>. ""This approach frees the application code from implementing transformations ""to / from a Hibernate type."msgstr """Suponha que você tenha um tipo Java, de alguma biblioteca, que precisa ser ""persistido mas não provê os acessórios necessários para mapeá-lo como um ""componente. Você deve implementar <literal>org.hibernate.UserType</literal>. ""Esta abordagem livra o código da aplicação de implementar transformações de/""para o tipo Hibernate."#. Tag: term#: best_practices.xml:98#, no-c-formatmsgid "Use hand-coded JDBC in bottlenecks."msgstr "Use código manual JDBC nos gargalos."#. Tag: para#: best_practices.xml:100#, no-c-formatmsgid """In performance-critical areas of the system, some kinds of operations might ""benefit from direct JDBC. But please, wait until you <emphasis>know</""emphasis> something is a bottleneck. And don't assume that direct JDBC is ""necessarily faster. If you need to use direct JDBC, it might be worth ""opening a Hibernate <literal>Session</literal> and using that JDBC ""connection. That way you can still use the same transaction strategy and ""underlying connection provider."msgstr """Nas áreas de desempenho crítico do sistema, alguns tipos de operações podem ""se beneficiar do uso direto do JDBC. Mas por favor, espere até você ""<emphasis>saber </emphasis> se é um gargalo. E não suponha que o uso direto ""do JDBC é necessariamente mais rápido. Se você precisar usar diretamente o ""JDBC, vale a pena abrir uma <literal>Session</literal> do Hibernate e usar ""uma conexão JDBC. De modo que você possa ainda usar a mesma estratégia de ""transação e ocultar o provedor a conexão"#. Tag: term#: best_practices.xml:110#, no-c-formatmsgid "Understand <literal>Session</literal> flushing."msgstr "Entenda o <literal>Session</literal> flushing."#. Tag: para#: best_practices.xml:112#, no-c-formatmsgid """From time to time the Session synchronizes its persistent state with the ""database. Performance will be affected if this process occurs too often. You ""may sometimes minimize unnecessary flushing by disabling automatic flushing "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -