Tag: Hibernate

hibernate jointable kullanımı

import java.io.Serializable; import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; /**  *  * @author Muhammed YÜRÜRDURMAZ  */ @Entity @Table(name = "KISI_TBL") public class Kisi implements Serializable {     @Id     @GeneratedValue(strategy = GenerationType.AUTO)     @Column(name = "KISI_ID")     private int KisiId;     @Column(name="ISIM", length=64, nullable=false)     private String isim;     @ManyToMany     @JoinTable(name = "KISI_TELEFON_TBL", joinColumns = {         @JoinColumn(name = "KISI_ID")},     inverseJoinColumns = {         @JoinColumn(name = "TELEFON_ID")})     private List<Telefon> telefonlar;…

Read More

hibernate blob kullanarak resim kaydetme

import java.io.Serializable; import java.sql.Blob; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.Lob; import javax.persistence.ManyToOne; @Entity(name="resim") public class Resim implements Serializable {     @Column(name="id")     @Id     private int id;     @Column(name="resim")     @Lob     private Blob resim;     /**      * @return the id      */     public int getId() {         return id;     }     /**      * @param id the id to set      */     public void setId(int id) {         this.id = id;     }     /**      * @return the resim      */     public Blob getResim() {         return resim;…

Read More

java.lang.NoSuchMethodError org.objectweb.asm.ClassWriter hatası

Exception in thread “main” org.osoa.sca.ServiceRuntimeException: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:204) at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassLoader(NodeFactoryImpl.java:37) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:178) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:100) at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:182) at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63) at com.aa.tools.resource.test.TSMain.main(TSMain.java:17) Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V at org.apache.tuscany.sca.interfacedef.java.jaxws.BaseBeanGenerator.generate(BaseBeanGenerator.java:436) at org.apache.tuscany.sca.interfacedef.java.jaxws.FaultBeanGenerator.generate(FaultBeanGenerator.java:94) at org.apache.tuscany.sca.interfacedef.java.jaxws.GeneratedDataTypeImpl.getPhysical(GeneratedDataTypeImpl.java:106) at org.apache.tuscany.sca.binding.ws.wsdlgen.Interface2WSDLGenerator.generateOperation(Interface2WSDLGenerator.java:705) at org.apache.tuscany.sca.binding.ws.wsdlgen.Interface2WSDLGenerator.generate(Interface2WSDLGenerator.java:318) at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.createWSDLInterfaceContract(BindingWSDLGenerator.java:307) at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.createWSDLDocument(BindingWSDLGenerator.java:205) at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.generateWSDL(BindingWSDLGenerator.java:163) at org.apache.tuscany.sca.binding.ws.xml.BindingBuilderImpl.build(BindingBuilderImpl.java:48) at org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl.buildServiceBindings(ComponentServiceBindingBuilderImpl.java:68) at org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl.build(ComponentServiceBindingBuilderImpl.java:48) at org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl.build(CompositeBuilderImpl.java:259) at org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.buildComposite(RuntimeBootStrapper.java:255) at org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java:632) at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:200)…

Read More

hinbernate’te annotation kullanarak inheritance

bir superclass kullanarak bazı standart özellikleri eklemek için bir örnek @MappedSuperclass public class Base { @Column(name=”AKTIFMI”) private boolean aktifmi; } @Entity class Kayit extends BaseEntity { … } Tags: extend, Hibernate, Inheritance, Java, MappedSuperclass

Read More