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

📄 problematic.java

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 JAVA
字号:
package org.hibernate.test.instrument.domain;

/**
 * {@inheritDoc}
 *
 * @author Steve Ebersole
 */
public class Problematic {
	private Long id;
	private String name;
	private byte[] bytes;

	private Representation representation;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public byte[] getBytes() {
		return bytes;
	}

	public void setBytes(byte[] bytes) {
		this.bytes = bytes;
	}

	public Representation getRepresentation() {
		if ( representation == null ) {
			representation =  ( ( bytes == null ) ? null : new Representation( bytes ) );
		}
		return representation;
	}

	public void setRepresentation(Representation rep) {
		bytes = rep.getBytes();
	}

	public static class Representation {
		private byte[] bytes;

		public Representation(byte[] bytes) {
			this.bytes = bytes;
		}

		public byte[] getBytes() {
			return bytes;
		}

		public String toString() {
			String result = "";
			for ( int i = 0; i < bytes.length; i++ ) {
				result += bytes[i];
			}
			return result;
		}
	}
}

⌨️ 快捷键说明

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