2013年系统架构设计师复习笔记:hibernate配置

牛课网 考试宝典 更新时间:2024-05-18 00:21:36

hibernate配置】
  Hibernate同时支持xml 格式的配置文件,以及传统的properties文件配置方式,一般我们采用xml 型配置文件。xml配置文件提供了更易读的结构和更强的配置能力,可以直接对映射文件加以配置。
Hibernate的使用问题
  1.1标示符
  l)Increment
  2)Identity
  3)Sequence
  4)Assign
  5)Hilo
  1.2注意的问题
  l)Lazy
  2)Inverse
  3)Outer-join
  4)大数据量删除更新
  1.3技术经理和高级程序员如何利用Spring整合hibernate
  l)SessionFactory
  2}HibernateDaoSupport
  3) HibernateTemplate
  处理图像
  如果您的应用程序显示大量图像文件(例如,.jpg 和 .gif 文件),则您可以通过以位图格式预先呈现图像来显著改善显示性能。要使用该技术,请首先从文件中加载图像,然后使用 PARGB 格式将其呈现为位图。下面的代码示例从磁盘中加载文件,然后使用该类将图像呈现为预乘的、Alpha 混合 RGB 格式。例如:
  [C#]
  if ( image != null && image is Bitmap )
  {
  Bitmap bm = (Bitmap)image;
  Bitmap newImage = new Bitmap( bm.Width, bm.Height,
  System.Drawing.Imaging.PixelFormat.Format32bppPArgb );
  using ( Graphics g = Graphics.FromImage( newImage ) )
  {
  g.DrawImage( bm, new Rectangle( 0,0, bm.Width, bm.Height ) );
  }
  image = newImage;
  }
  [Visual Basic .NET]
  If Not(image Is Nothing) AndAlso (TypeOf image Is Bitmap) Then
  Dim bm As Bitmap = CType(image, Bitmap)
  Dim newImage As New Bitmap(bm.Width, bm.Height, _
  System.Drawing.Imaging.PixelFormat.Format32bppPArgb)
  Using g As Graphics = Graphics.FromImage(newImage)
  g.DrawImage(bm, New Rectangle(0, 0, bm.Width, bm.Height))
  End Using
  image = newImage
  End If

考试宝典安装说明

宝典适用于手机、电脑、平板,您可安装客户端或在浏览器使用。

电脑版

手机版

网页版

考试宝典咨询
服务热线

TEL:029-88699698