if (app.getDbMapping (proto.getName ()) == null) {
if (proto.getDbMapping() == null) {
    public void update () {	if (!file.exists ()) {	    remove ();	} else {	    ZipFile zip = null;	    // collect created protos - we need this to check DbMappings for each created	    // prototype afterwards	    HashSet newPrototypes = new HashSet ();	    try {	        lastmod = file.lastModified ();	        // System.err.println ("UPDATING ZIP FILE "+this);	        zip = new ZipFile (file);	        for (Enumeration en = zip.entries (); en.hasMoreElements (); ) {	            ZipEntry entry = (ZipEntry) en.nextElement ();	            String ename = entry.getName ();	            StringTokenizer st = new StringTokenizer (ename, "/");	            if (st.countTokens () == 2) {	                String dir = st.nextToken ();	                String fname = st.nextToken ();	                // System.err.println ("ZIPENTRY: "+ dir +" ~ "+fname);	                Prototype proto = app.typemgr.getPrototype (dir);	                if (proto == null) {	                    proto = app.typemgr.createPrototype (dir);	                    newPrototypes.add (proto);	                }	                if (fname.endsWith (".hac")) {	                    String name = fname.substring (0, fname.lastIndexOf ("."));	                    String content = getZipEntryContent (zip, entry);	                    // System.err.println ("["+content+"]");	                    ActionFile act = new ActionFile (content, name, proto);	                    proto.actions.put (name, act);	                    // mark prototype as updated	                    proto.markUpdated ();	                }	                else if (fname.endsWith (".hsp")) {	                    String name = fname.substring (0, fname.lastIndexOf ("."));	                    String content = getZipEntryContent (zip, entry);	                    // System.err.println ("["+content+"]");	                    Template tmp = new Template (content, name, proto);	                    proto.templates.put (name, tmp);	                    // mark prototype as updated	                    proto.markUpdated ();	                }	                else if (fname.endsWith (".skin")) {	                    String name = fname.substring (0, fname.lastIndexOf ("."));	                    String content = getZipEntryContent (zip, entry);	                    // System.err.println ("["+content+"]");	                    SkinFile skin = new SkinFile (content, name, proto);	                    proto.skins.put (name, skin);	                }	                else if (fname.endsWith (".js")) {	                    String name = fname.substring (0, fname.lastIndexOf ("."));	                    String content = getZipEntryContent (zip, entry);	                    // System.err.println ("["+content+"]");	                    FunctionFile ff = new FunctionFile (content, name, proto);	                    proto.functions.put (name, ff);	                    // mark prototype as updated	                    proto.markUpdated ();	                }	                else if ("type.properties".equalsIgnoreCase (fname)) {	                    String name = fname.substring (0, fname.lastIndexOf ("."));	                    SystemProperties props = new SystemProperties (zip.getInputStream (entry));	                    // DbMapping does its own registering, just construct it.	                    new DbMapping (app, proto.getName (), props);	                    // mark prototype as updated	                    proto.markUpdated ();	                }	            }	        }	        for  (Iterator it = newPrototypes.iterator (); it.hasNext (); ) {	            Prototype proto = (Prototype) it.next ();	            if (app.getDbMapping (proto.getName ()) == null) {	                // DbMapping doesn't exist, we still need to create one	                SystemProperties props = new SystemProperties ();	                // DbMapping does its own registering, just construct it.	                proto.setDbMapping (new DbMapping (app, proto.getName (), props));	            }	        }	    } catch (Throwable x) {	        System.err.println ("Error updating ZipFile: "+x);	    } finally {	        try {	           zip.close ();	        } catch (Exception ignore) {}	    }	}    }